Execute current API operation. Before calling this function, you must first at least set up the operation with INIT and ENDPOINT functions.
temporary Record "API Entry RWU" - Use to get the internal temporary batch entries that were generated during the request (mainly for testing purposes).Before version
1.0.13.12(BC 25) this function had a required boolean parameter and should be called asAPIScriptRWU.EXECUTE(true).
Boolean True, if the service responded with OK HTTP status, or the error response was successfully processed with an operation response schema (Process as Success settings). False otherwise.//Run the operation to get all customers
APIScriptRWU.INIT(OperationID::TestProvider_GetAllCustomers);
APIScriptRWU.ENDPOINT(ProviderID::TestProvider, OperationID::TestProvider_GetAllCustomers);
APIScriptRWU.EXECUTE();
//Use the EXECUTE return value
if APIScriptRWU.EXECUTE() then
//Handle correct response
else
//Handle error response
//Get all temporary batch entries for testing purposes
var
TempAPIEntryRWU: Record "API Entry RWU" temporary;
APIScriptRWU.EXECUTE(TempAPIEntryRWU);
if TempAPIEntryRWU.FindFirst() then ...