Just wanted to confirm once. Have a UE after submi...
# suitescript
r
Just wanted to confirm once. Have a UE after submit script1 deployed on a record. Script loads the record updates a field and save the record. Have another UE after submit script2 deployed on the same record. Will the script2 pickup the new value in after submit or the old value?
e
The old value, probably. The first UE will never trigger the second
r
That's what I always assumed as well but since both are deployed on the same record. It's taking the new value. Script 1 was changing the shipping address on a purchase order. Script 2 was fetching the shipping address for some other purpose, and it took the new value. Maybe it's because shipping address is a subrecord.
e
Could be a race, depending on the order the scripts are deployed in and the timing of when they execute, the new value might get set before the second script runs
r
Could be, need to do a bit more testing, before I can be sure of anything.
e
Could the address update be relocated to
beforeSubmit
?