Use task.checkStatus() to check the status of the task
Task Types
- CSV import
- Entity deduplication
- Map/reduce script
- Query
- Record action
- Scheduled script
- Search
- SuiteQL
- Workflow trigger
Sample Code
// Add additional code ...
var myTask = task.create({
taskType: task.TaskType.QUERY
});
// Submit the task
var myTaskId = myTask.submit();
// Check the status
var myTaskStatus = task.checkStatus({
taskId: myTaskId
});