Running an internal procedure or user-defined function
Methods to run an ABL internal procedure and user-defined function of a persistent procedure (ProcObject) are indistinguishable in client code. These methods:
Run only in the context of a defining ProcObject
Require a ProcObject ID in the SOAP request header, which is the object ID of the defining ProcObject
This is the ABL prototype for the sample user-defined function, GetTotalOrdersByNumber( ):
ABL prototype for a user-defined function
/* CustomerOrder.p */
FUNCTION GetTotalOrdersByNumber RETURNS INTEGER (Threshold AS DECIMAL):
This is a VB.NET declaration for the ABL user-defined function method, GetTotalOrdersByNumber( ):
VB.NET prototype for an ABL user-defined function method
Public Function GetTotalOrdersByNumber (ByVal Threshold As Decimal) As Integer
The following is a sample method call for the user-defined function method, GetTotalOrdersByNumber, which is an interface method on the sample ProcObject, CustomerOrder:
VB.NET client code of method to run an ABL user-defined function
Note that user-defined function methods return a value whose data type maps to the ABL data type of the user-defined function's return value.
This is a sample Doc/Lit SOAP request that might be generated from invoking the GetTotalOrdersByNumber( ) method to execute the ABL user-defined function, passing in a Threshold order value of 2150.99:
SOAP request for user-defined function method, GetTotalOrdersByNumber