Aaron McCausland
03/12/2026, 4:59 PMCeligo AI
03/12/2026, 4:59 PMAI generated answer (using internal Slack threads):To set up a Workflow that can only be asynchronously started by a script's task module submitting a
triggerWorkflow type of Task, you should follow these steps:
1. Create your Workflow in NetSuite. Make sure to remove all triggers on the workflow page. This can be done by unchecking both "On Create" and "On View or Update" options. This ensures that the workflow will not be triggered by any other event or action.
2. Set the context of the workflow to ACTION. This means the workflow will only be initiated when it is explicitly called by a script.
3. In your SuiteScript, use the N/task module to create a WorkflowTriggerTask. This task will be responsible for initiating the workflow.
4. The workflow can be set to run asynchronously using the N/task module in your script. This means that the workflow will run in the background, allowing your script to continue executing without waiting for the workflow to complete.
5. If you need to pass data to the workflow, you can do so through a field on the record or through a workflow parameter.
Here is a sample code snippet for creating a `WorkflowTriggerTask`:
javascript
var workflowTask = task.create({taskType: task.TaskType.WORKFLOW_TRIGGER});
workflowTask.recordType = 'customrecord_my_record'; // replace with your record type
workflowTask.recordId = 123; // replace with your record id
workflowTask.workflowId = 'customworkflow_my_workflow'; // replace with your workflow id
var workflowTaskId = workflowTask.submit();
Remember, workflows run in association with an instance of a record, similar to user events, so you need a unique instance of a record for each async workflow execution. The same workflow cannot be running multiple at the same time on the same record instance.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/12/2026, 4:59 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829223633
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826232791
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825927734
Celigo AI
03/12/2026, 4:59 PMCeligo AI
03/12/2026, 10:21 PMAaron McCausland
03/12/2026, 10:22 PM