Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
How to pass script parameters between getinput and map?
Hi There
I have the following map reduce script:
/**
*@NApiVersion 2.x
*@NScriptType MapReduceScript
*/
define(["N/record", "N/search", "N/runtime"], function (
record,
search,
runtime
) {
function getInputData() {
try {
var scriptObj = runtime.getCurrentScript();
var recordId = scriptObj.getParameter("custscript_recordid");
var picked = scriptObj.getParameter("custscript_picked_status");
var packed = scriptObj.getParameter("custscript_packed_status");
var shipped = scriptObj.getParameter("custscript_shipped_status");
log.debug(
"statuses",
" picked: " + picked + " packed: " + packed + " shipped: " + shipped
);
var salesOrderid = recordId;
log.debug("recordid", salesOrderid);
var salesorderSearchObj = search.create({
type: "salesorder",
Tagged:
0