Using `afterSubmit`... How does the field `status`...
# suitescript
e
Using
afterSubmit
... How does the field
status
works regarding
oldRecord
/
newRecord
when closing a sales order? A field like
memo
comes as expected: previous value, new value. But after closing a sales order (using the close button or manually closing the lines then saving) returns de exact same value for
oldRecord
/
newRecord
c
In my experience, there are a few fields that appear to have some delay in updating on save. For those fields, I usually have to do a
load/getValue
or
search.lookupFields
in the
afterSubmit
entry point. Maybe someone with more knowledge can speak to the exact reasons, but it appears to me that there may be a background process required to calculate and save those field values that hasn't finished by the time
context.newRecord
is defined.
☝️ 1
e
Thanks!
b
the newRecord only reflects the record as submitted, at the time it did not have a status of closed
👀 1
🙌 1