NElliott
10/16/2024, 10:05 AMCeligo AI
10/16/2024, 10:05 AMAI generated answer (using internal Slack threads):To trigger a Map/Reduce script via a call to a RESTlet, you would need to have the 'SuiteScript' permission. This permission allows you to create, edit, and execute scripts in NetSuite. To delete files in the file cabinet, you would need the 'Lists -> Documents and Files' permission. This permission allows you to add, edit, and delete files in the file cabinet. However, please note that the user should also have the necessary permissions for the specific records that the Map/Reduce script is interacting with. For example, if the script is modifying Sales Orders, the user would also need the 'Transactions -> Sales -> Edit' permission. Here is a sample code snippet on how you can trigger a Map/Reduce script from a RESTlet:
javascript
var scriptTask = task.create({taskType: task.TaskType.MAP_REDUCE});
scriptTask.scriptId = 'customscript_my_map_reduce';
scriptTask.deploymentId = 'customdeploy_my_map_reduce';
var scriptTaskId = scriptTask.submit();
Remember to replace 'customscript_my_map_reduce' and 'customdeploy_my_map_reduce' with your actual script and deployment IDs.
******
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
10/16/2024, 10:05 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830851376
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828296602
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823673189
Celigo AI
10/16/2024, 10:05 AMNElliott
10/16/2024, 10:23 AM