Reputation: 310
I have a workflow, in that I have a workflow field in the entry level which captures values from "Event" record. The workflow triggers a workflow action script also. In that script I need the workflow field value which already have the event field data. Is there a way to get this in suitescript 1.0? Please help. Thanks in advance.
Upvotes: 0
Views: 2979
Reputation: 2069
To read value from workflow/state field in workflow-action script, you need to set it in workflow-action script paramerter.
So, you will need to create a workflow-action script parameter and in your custom-action(in your worflow state), pass it default value from workflow/state field and then you fetch its value like you would for a script parameter.
eg. In SuiteScript 1.0
nlapiGetContext().getSetting('SCRIPT', SCRIPT_PARAM_ID);
In SuiteScript 2.0
runtime.getCurrentScript().getParameter({ name: SCRIPT_PARAM_ID });
Upvotes: 3