Modules

filter

 

Objects/Functions

module (N/task)

SuiteScript 2.0

SearchTask.inboundDependencies

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=SearchTask.inboundDependencies for more information.

N/task Module
SearchTask.inboundDependencies
Property Description: Key/value pairs that contain information about the dependent scripts added to the search task. Use this property to verify the properties of dependent scripts after you add the scripts using SearchTask.addInboundDependency(). This property uses nested objects to store information about each dependent script. A nested object is included for each dependent script added to the search task. The nested object contains information such as the task type, script ID, and deployment ID. It also includes the index of the script (starting at 0). Dependent scripts are indexed in the order they are added to the search task. For example, consider a situation in which you add a scheduled script task and a map/reduce script task to a search task as dependent scripts. After you add the dependent scripts, but before you submit the search task using SearchTask.submit(), the value of the SearchTask.inboundDependencies property is similar to the following: After you submit the search task, the internal IDs of the dependent scripts are added to the SearchTask.inboundDependencies property:
Type: Object[] (read-only)
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/task Module
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=SearchTask.inboundDependencies

Example:

// Code Example 1
{"0":
{"type":"task.ScheduledScriptTask", "scriptId":"customscript_as_ftr_ss", "deploymentId":"customdeploy_ss_dpl",
"params":
{"custscript_ss_as_srch_res":"SuiteScripts/ExportFile.csv"}
},
"1":
{"type":"task.MapReduceScriptTask", "scriptId":"customscript_as_ftr_mr", "deploymentId":"customdeploy_mr_dpl",
"params":
{"custscript_mr_as_srch_res":"SuiteScripts/ExportFile.csv"}
}
}

// Code Example 2
{"0":
{"type":"task.ScheduledScriptTask", "id":"SCHEDSCRIPT_0168697b126d1705061d0d690a787755500b046a1912686b10_349d94266564827c739a2ba0a5b9d476f4097217", "scriptId":"customscript_as_ftr_ss", "deploymentId":"customdeploy_ss_dpl",
"params":
{"custscript_ss_as_srch_res":"SuiteScripts/ExportFile.csv"}
},
"1":
{"type":"task.MapReduceScriptTask", "id":"MAPREDUCETASK_0268697b126d1705061d0d69027f7b39560f01001c_7a02acb4bdebf0103120b09302170720aa57bca4", "scriptId":"customscript_as_ftr_mr", "deploymentId":"customdeploy_mr_dpl",
"params":
{"custscript_mr_as_srch_res":"SuiteScripts/ExportFile.csv"}
}
}

// Code Example 3
// Add additional code
//...
var scheduledScript = task.create({
taskType: task.TaskType.SCHEDULED_SCRIPT
});
// Set the properties of the scheduled script task
scheduledScript.scriptId = 'customscript_as_ftr_ss';
//...

var mapReduceScript = task.create({
taskType: task.TaskType.MAP_REDUCE
});
// Set the properties of the map/reduce script task
mapReduceScript.scriptId = 'customscript_as_ftr_mr';
//...

asyncTask.addInboundDependency(scheduledScript);
asyncTask.addInboundDependency(mapReduceScript);

var asyncTaskId = asyncTask.submit();

// Iterate over the dependent scripts
var p = asyncTask.inboundDependencies;
for (var key in p) {
log.debug(key + ' > ' + p[key]);
}
//...
// Add additional code

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