API

Events

Events of the VPS

DoSkipWorkCenterOnDataLoad

This event allows the customer to prevent (skip) the loading of certain workcenters into the simulation during the load/reload phase. Subordinate or connected elements will then also not be loaded into the simulation.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)] 

procedure DoSkipWorkCenterOnDataLoad(pClientGuid: Guid; 

var pWorkCenter:Record "Work Center"; var pSkip: Boolean; 
var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid


Guid


This value is used for the global identification of VPS Control-AddIn on a page.

 

var pWorkCenter

Record 

Determines which record will be skipped.

var pSkip

Boolean

Determines whether records will be skipped or not.

var pHandled

Boolean

If it returns true, the event will be skipped

OnAfterProdOrderRoutingLineSelectionChange

This event occurs when one or more production order routing lines get selected.

Please note: Multiselect is not officially released but can be unlocked by knowledgeable customers.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnAfterProdOrderRoutingLineSelectionChange(pClientGuid: Guid; 

pProdOrderRoutingLinePositions: List of [Text]; var pHandled: Boolean)


 

 

Data type

Description

Parameter:

 

 

pClientGuid

Guid

This value is used for the global identification of VPS Control-AddIn on a page.

pProdOrderRoutingLinePositions

List of [Text]

List of selected production order routing lines. By default, there is one production order routing line. In the future, in case of multi-selection, several Production Order Routing Lines will be selected

var pHandled

Boolean

If it returns true, the event will be skipped

OnBeforeTransfer events

These events can be used to modify Business Central data before transferring them into our simulation data. Not only simple modifications are possible, but also complex ones such as the application of flowFields/Flowfilters and thus execution of self-created or already existing formulas. The changes will not be saved in the Business Central data.

For more details on the events see here.

The events in detail:

OnBeforeTransferMachineCenter

This event occurs on loading a machine center

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferMachineCenter(pClientGuid: Guid; 
var pMachineCenterRecord: Record “Machine Center”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pMachineCenterRecord

Record

The machine center to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

OnBeforeTransferProdOrder

This event occurs on loading a production order.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferProdOrder(pClientGuid: Guid; 
var pProdOrderRecord: Record “Production Order”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pProdOrderRecord

Record

The production order to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

OnBeforeTransferProdOrderLine

This event occurs on loading a production order line.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferProdOrderLine(pClientGuid: Guid; 
var pProdOrderLineRecord: Record “Prod. Order Line”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pProdOrderLineRecord

Record

The production order line to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

 

OnBeforeTransferProdOrderRoutingLine

This event occurs on loading a production order routing line.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferProdOrderRoutingLine(pClientGuid: Guid; 
var pProdOrderRoutingLineRecord: Record “Prod. Order Routing Line”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pProdOrderRoutingLineRecord

Record

The production order routing line to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

 

OnBeforeTransferWorkCenter

This event occurs on loading a work center.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferWorkCenter(pClientGuid: Guid; 
var pWorkCenterRecord: Record “Work Center”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pWorkCenterRecord

Record

The work center to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

 

OnBeforeTransferWorkCenterGroup

This event occurs on loading a work center group.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnBeforeTransferWorkCenterGroup(pClientGuid: Guid; var pWorkCenterGroupRecord: Record “Work Center Group”; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

pClientGuid

 

Guid

 

This value is used for the global identification of VPS Control-AddIn on a page.

var pWorkCenterGroupRecord

Record

The work center group to be loaded.

var pHandled

Boolean

The event will be handled if it returns true

OnProdOrderRoutingLineCustomFunction

This event can be used, for example, to execute custom code in a context related to a production order routing line. The context is determined by the parameter pContext. (e.g. in the context menu of the Capacity View). See also "OnProvideProdOrderRoutingLineCustomFunctions".

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnProdOrderRoutingLineCustomFunction(pClientGuid: Guid; 

pProdOrderRoutingLinePosition: Text; pCustomFunctionKey:  Text; 

pContext: Option; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

 

 

pClientGuid

Guid

This value is used for the global identification of VPS Control-AddIn on a page.

pProdOrderRoutingLinePosition

Text

List of selected production order routing lines. By default, there is one production order routing line. In the future, in case of multi-selection, several Production Order Routing Lines will be selected

pCustomFunctionKey

Text

Specifies the context menu item.

pContext

Option

Describes the context menu item in more detail.

var pHandled

Boolean

If it returns true, the event will be skipped

OnProvideProdOrderLineAdditionalDateLine

This event, which is triggered during the loading phase, can be used to configure an additional dateline for a production order line in the Capacity View. This wdate line ill be displayed when selecting your ProductionOrderRoutingLine.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnProvideProdOrderLineAdditionalDateLine(pClientGuid: Guid; 

pProdOrderLinePosition: Text; var pDateLineDateTime: DateTime; 

var pDescription:  Text; var pColor:  Text; var pDescriptionColor: Text; 
var pThickness: integer; var pDashArray:  Text; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

 

 

pClientGuid

Guid

This value is used for the global identification of VPS Control-AddIn on a page.

 

pProdOrderLinePosition

Text

Position of a selected production order routing line.

var pDateLineDateTime

DateTime

Date of the additional date line of a production order line.

var pDescription

Text

Description of the additional date line of a production order line.

var pColor

Text

Color of the additional date line of a production order line.

var pDescriptionColor

Text

Color of the description of the additional date line of a production order line.

var pThickness

Integer

Line thickness of the additional date line of a production order line.

var pDashArray

Text

Dash of the additional date line of a production order line.

var pHandled

Boolean

If it returns true, the event will be skipped

OnProvideProdOrderRoutingLineColor

This event occurs when, upon loading/reloading the data from Business Central, color and text color of the bars are configured individually. This applies to the Production Order View and the Capacity View. If the pHandled parameter is set to false, the default color is set.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnProvideProdOrderRoutingLineColor(pClientGuid: Guid; 

pProdOrderRoutingLinePosition: Text; var pBarColor: Text; 

var pTextColor: Text; var pHandl ed: Boolean)

 

 

Data type

Description

Parameter:

 

 

pClientGuid

Guid

This value is used for the global identification of VPS Control-AddIn on a page.

 

pProdOrderRoutingLinePosition

Text

Position of a selected production order routing line.

var pBarColor

Text

Specifies the bar color.

var pTextColor

Text

Specifies the text color.

var pHandled

Boolean

If it returns true, the event will be skipped

OnProvideProdOrderRoutingLineCustomFunctions

This event allows the customer to "register" custom code or functionality on production order routing lines. This functionality can then be executed via the OnProdOrderRoutingLineCustomFunction event. (Example: a custom functionality on the context menu of a production order line in the Capacity View), see also OnProdOrderRoutingLineCustomFunction.

[IntegrationEvent(/*IncludeSender*/false, /*GlobalVarAccess*/false)]

procedure OnProvideProdOrderRoutingLineCustomFunctions

(pCustomFunctionsKeysAndDescriptions: Dictionary of [Text, Text]; 

pContext: Option; var pHandled: Boolean)

 

 

Data type

Description

Parameter:

 

 

pCustomFunctionsKeysAndDescriptions

Dictionary of [Text, Text]

List with keys and descriptions of context menu items.

pContext

Option

More precise description of context menu item.

var pHandled

Boolean

If it returns true, the event will be skipped.