SearchTask.submit()
Method Description |
Directs NetSuite to initiate the asynchronous search task and return a unique ID for the task. When the submission is successful, this method adds the internal IDs of any dependent scripts (added using SearchTask.addInboundDependency()) to the SearchTask.inboundDependencies property. Use task.SearchTaskStatus to view the status of a submitted task. |
Returns |
string The task ID |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
100 units |
Module |
|
Since |
2017.1 |
Errors
Error Code |
Thrown If |
---|---|
|
The task cannot be submitted. |
|
A required parameter is missing. |
|
You do not have permission to access the file. |
|
The file Object references a file that doesn’t exist. |
|
The path specifies a folder and not a file. |
|
The search task was already submitted and completed successfully. |
|
A dependent map/reduce script is already submitted and is not complete. |
|
The status of the deployment record for the specified dependent map/reduce script has a value other than “Not Scheduled”. |
|
A dependent scheduled script is already submitted and is not complete. |
|
The status of the deployment record for the specified dependent scheduled script has a value other than “Not Scheduled”. |
|
A deployment record for the specified dependent script is not available for one of the following reasons:
|
|
The same dependent script is passed to this method more than one time. |
|
The specified dependent script is not found. |
|
The search task with the specified search ID is not found. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/task Module Script Samples.
//Add additional code
...
var searchTriggerTask = searchTask.submit();
...
//Add additional code