`N/runtime.getCurrentScript().getParameter()`
# suitescript
e
N/runtime.getCurrentScript().getParameter()
t
I’m not able to use this to get the parameter I created. Here is some example code of what I’m doing:
Copy code
let scriptTask = task.create({
    taskType: task.TaskType.MAP_REDUCE
});
scriptTask.scriptId = scriptId;
scriptTask.deploymentId = deploymentId;
scriptTask.params = { id: '1' }
scriptTask.submit()
When I try to use runtime.getCurrentScript().getParameter({ name: ‘id’ }), nothing gets returned. Am I just not able to use task.params in this way?
The issue was that I wasn’t defining the parameter field on the script itself. All set now, thanks for your help!