my question is if it is possible to assign a new a...
# suitescript
m
my question is if it is possible to assign a new address to a customer in beforeSubmit or I need to program the after submit instead and reload the submitted record
m
I tool a peak at a script I wrote to auto-add addresses to customers, for whatever it's worth... i wrote it in Dynamic = true and in afterSubmit
m
i ended up doing that
thanks
it did work in dynamic mode and in after submit but it does not work in before submit and not dynamic mode.
s
sublist data access certainly does not require dynamic mode as a general rule. I almost never use dynamic mode in server-side scripts.
m
but it should be in after submit right? or you say it should work in before submit. Regardless the dynamic mode set to true
s
I don't remember for sure if it has to be after submit in this case, but what makes the situation a bit unique is it's not sublist data you're trying to set but rather subrecord data.... so it may indeed require aftersubmit since the subrecord needs to be associated to a yet-to-be-saved new parent record.
maybe NS handles that case automagically in beforesubmit, that's the part I don't remember.