Submitting an On-Demand Map/Reduce Script Deployment from the UI

You can submit map/reduce scripts for processing on demand from the NetSuite UI. To submit a script in this way, use the Save and Execute command on the Script Deployment page. The Status field on the deployment must be set to Not Scheduled.

You can also submit an on-demand deployment programmatically. For details, see Submitting an On–Demand Map/Reduce Script Deployment from a Script.

Note that after you submit an on-demand deployment of a script, the script does not necessarily execute right away. There might be a short delay before the script runs, even if no other scripts are ahead of it. If other scripts are waiting, this script will wait until they're done. For more details about how map/reduce scripts are processed, see SuiteCloud Processors.

The system only submits the deployment if the Deployed box is checked, regardless of the Status. To stop a map/reduce script, uncheck the Deployed box. For more details on this choice, see Status.

To submit an on-demand map/reduce script for processing from the UI:

  1. Create your map/reduce script entry point script. This involves uploading a JavaScript file and creating a script record from it. To review a map/reduce script example, see SuiteScript 2.x Map/Reduce Script Type. If this script is your first, see SuiteScript 2.x Hello World and SuiteScript 2.x Entry Point Script Creation and Deployment.

  2. Open the appropriate script record in view mode. Click the Deploy Script button.

  3. When the script deployment record loads, check the Deployed box, if it's not already checked.

  4. Set the Status field to Not Scheduled.

  5. Set the remaining body fields. For help understanding the fields, see Map/Reduce Script Deployment Record.

  6. Select Save and Execute from the Save dropdown list.

Note:

In some cases, you may want to submit a map/reduce script for processing multiple times simultaneously, or within a short time frame. However, the system won't let you submit a script deployment if a previous instance is already submitted and not finished. To solve this, create multiple deployments for the script. In other words, repeat Steps 2 through 6 of the procedure above as needed.

Related Topics

General Notices