NSOA.NSConnector.integrateAllNow()
This function lets you trigger the integration to run for all active integration workflows from your scheduled scripts. It is equivalent to clicking the Run button on the OpenAir NetSuite Connector screen and selecting all workflows. For more information about running the integration, see Running the Bulk Import and Export Integration on Demand.
This function:
-
Must be called from a scheduled script.
-
Cannot be called only once in the same scheduled script.
-
Cannot be called if the
NSOA.NSConnector.integrateWorkflowGroup(name)
is called in the same scheduled script. See NSOA.NSConnector.integrateWorkflowGroup(name)
Parameters
-
(none)
Returns
-
Boolean true if integration was triggered and false if integration was not triggered.
Units Limit
-
1000 units
For more information, see Scripting Governance.
Since
-
April 16, 2016
Example
-
This example triggers the NetSuite integration for all fields using a scheduled script.
function main() { var records = NSOA.wsapi.read(...); // check if result is OK if (!records || !records[0]) return; // trigger NetSuite integration if there is no error and more than 50 records else if (records[0].errors === null && records[0].objects &&records[0].objects.length > 50) { NSOA.NSConnector.integrateAllNow(); } }
Note:This simple example does not show error checking, see Handling SOAP Errors.
See Code Samples for more examples.