Trigger workflow using Suitescript

Use workflow.trigger() to trigger workflow on a record. The actions and transitions of the workflow are evaluated for the record in the workflow instance, based on the current state for the workflow instance.

Returns the internal ID of the workflow instance used to track the workflow against the record.

Suitescript Sample

let workflowInstanceId = workflow.trigger({
    recordId: '5', // replace with an actual record id
    recordType: 'salesorder',
    workflowId: 'custworkflow_name',
    actionId: workflowaction25
});

Leave a comment

Your email address will not be published. Required fields are marked *