It should work in `beforeSubmit`; in `afterSubmit`...
# suitescript
e
It should work in `beforeSubmit`; in
afterSubmit
, you would need to load the record, set the field, submit the record, which would then cause duplicate submissions of the record every time it gets saved