Developing Custom Actions

When the custom action parameters are passed from Scribe Insight to Dynamics NAV, they are converted to records in the Scribe Parameters Buffer table.

When designing a codeunit for the custom action, its TableNo property must be set to ”Scribe Parameters Buffer”. This can be done by pressing SHIFT + F4 in the design mode of a codeunit.

Note: All custom actions must be set up in this way.

In the design of each custom action, there is the OnRun trigger that controls the receipt of input parameters from the Scribe Parameters Buffer table. It calls the function that initializes input parameters, performs the action, sets the output parameters, and resets custom action definition to default. The following code sample represents the OnRun trigger of the ConvertSalesQuote action.

OnRun(VAR Rec : Record "Scribe Parameters Buffer"

// information will be reset if 'ResetToDefaults' parameter is passed

IF ResetToDefaults(Rec) THEN

EXIT;

// set global variables 'DocumentType' and 'DocumentNo' with actual data

GetInputParameters(Rec);

// execute action

ExecuteCustomAction();

// set output parameters

SetOutputParameters(Rec);

The following table displays the global variables defined for the ConvertSalesQuote custom action.

Name DataType Subtype Length
SalesQuoteToOrder Codeunit Sales-Quote to Order DocumentNo
Code   20  

See also

Custom action methods

Activating The Insight Actions