When selecting a customer in a Sale Order (Create ...
# suitescript
s
When selecting a customer in a Sale Order (Create mode), I observed : the "shipadress" field in line level is set multiple times . Meaning there is a fieldchange trigger happening multiple times to this same field . How I observed: created a client script with fieldchange function with a console.log -if the the shipaddress field is changed. What I got in console : Shipaddress change happened 1 time in header and 4 times in line . Why I'm concerned: Because I have a function to execute on the shipadress change trigger. Since it changes multiple times , my code block runs multiple times which impacts performance. Question : why does the shipadress is triggered multiple times when a customer is chosen? Did you come across the behaviour? Any suggestions to curb this behaviour? Any input is most welcomed . Kindly let this a try !
s
I've seen similar behaviour. I think shipaddress is a calculated field, created from the address elements in the addressbook entry marked as default shipping. So anything which updates that sublist seems to for e it to be recalculated.
s
Hey @Stuart Anderton So this is default behaviour right ? We can only restrict based on conditions but cannot make it trigger lesser times without scripts nor find the cause for the trigger . Right ?
s
I don't know, I just see multiple setting/unsetting of the value in a customer system notes.
s
Ok @Stuart Anderton, thanks for the input. Atleast ik I'm not alone with this now.