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
After you submit the search task, the internal IDs of the dependent scripts are added to the
|
Type |
Object[] (read-only) |
Module |
|
Since |
2018.2 |
Errors
Error Code |
Thrown If |
---|---|
|
Setting the property is attempted |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/task Module Script Samples.
// 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