API Events VPS

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.

Example:

 [EventSubscriber(ObjectType::Codeunit, Codeunit::"NETVPS IntegrationMgmt", 'OnProvideProdOrderRoutingLineCustomFunctions', '', false, false)]

    local procedure handleOnProvideProdOrderRoutingLineCustomFunctions(pCustomFunctionsKeysAndDescriptions: Dictionary of [Text, Text]; pContext: Option; var pHandled: Boolean)

    var

        _integrationMgmt: Codeunit "NETVPS IntegrationMgmt";

    begin

            case pContext of

                _integrationMgmt.getProdOrderRoutingLineCustomFunctionContext() ::contextMenuProdOrderView:

                  // additional contextmenu items for Porl contextMenu in ProdOrderView

                    begin

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction1', 'customProdOrderViewFunction 1');

                        pCustomFunctionsKeysAndDescriptions.Add('separator1', '-----------------------------------------------');

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction2', 'customProdOrderViewFunction 2');

                        pCustomFunctionsKeysAndDescriptions.Add('separator2', '-----------------------------------------------');

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction3', 'customProdOrderViewFunction 3');

                    end;




                _integrationMgmt.getProdOrderRoutingLineCustomFunctionContext() ::contextMenuCapacityView:

                    Begin

// additional contextmenu items for Porl contextMenu in CapacityView

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction1', 'customCapacityViewFunction 1');

                        pCustomFunctionsKeysAndDescriptions.Add('separator1', '-----------------------------------------------');

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction2', 'customCapacityViewFunction 2');

                        pCustomFunctionsKeysAndDescriptions.Add('separator2', '-----------------------------------------------');

                        pCustomFunctionsKeysAndDescriptions.Add('customFunction3', 'customCapacityViewFunction 3');

                    end;

            end;

            //important!!! pHandled must be true in order the settings to be handled in VPS

            pHandled := true;

    end;