Modules

filter

 

Objects/Functions

module (N/task)

SuiteScript 2.0

MapReduceScriptTask.submit()

{MapReduceScriptTask}.submit(){FAILED_TO_SUBMIT_JOB_REQUEST_1: {Failed to submit job request: {reason}}})

N/task Module
MapReduceScriptTask.submit()
Method Description: Submits a map/reduce script deployment for processing. For more information, see task.MapReduceScriptTask. Additionally, note that a map/reduce script can be submitted for processing only if there is no unfinished map/reduce script task for the same script ID and script deployment ID. For this reason, if a map/reduce script resubmits itself, the actual resubmit does not occur until the current execution completes. This delay is necessary to avoid the existence of two unfinished tasks for the same deployment of the same script. Therefore, if a map/reduce script uses the submit() method to resubmit itself, then at runtime, no task ID is returned when the map/reduce script is submitted. Executing a map/reduce script from a server script requires either the Administrator role or a role with the SuiteScript Scheduling permission. For general information about the execution of map/reduce scripts, see SuiteScript 2.0 Map/Reduce Script Submission.
Returns: string The task ID, except as noted above.
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 20 units
Module: N/task Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=MapReduceScriptTask.submit()

Example:

// Code Example 1
//Add additional code
//...
var mrTaskId = mrTask.submit();
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_453639770507.html