RE: AfterSubmit Suitescript 1.0
Answered
Hi Everyone,
nlapiSetFieldValue can also use in aftersbumit session? I tried to log the value of variable and it has a value but after set it to field and log it no value after submit record.
Anyone has idea how to use nlapiSetFieldValue in after submit record. Thank you
Best answer
If you really need to change the value of a field in the afterSubmit you need to load and save the record. nlapiSetFieldValue is not going to fail but it’s not going to change the record.
That being said, it’s preferable to change fields of the current record in the beforeSubmit because you don’t need to load/save the record, nlapiSetFieldValue should work there. (of course this is not always possible)