If a workflow action script is executed in the Ent...
# suitescript
w
If a workflow action script is executed in the Enter State-trigger, wouldn't you have to save the record in the script for any changes to take effect?
I've come across an old script that uses nlapiGetNewRecord().setFieldValue() but never submits the record. But it still seems to work. I suspect it works because in the same trigger, there's a standard set field value action that updates a field. I suppose that action takes the same record that the script has modified and saves it?
c
Is there a save step in the workflow over all? Or a "close" (as in complete everything) step? That might also explain why the script works while not having an explicit submit.
r
When I create custom workflow actions scripts, I dont need to explicitly save the record. This is regardless of the trigger
w
Ok, good to know! Thanks.😀 I expected that would be the behaviour when the action script is executed in before load, before submit or after submit. But not in entry or exit.