Is there a way to update the subsidiary in before ...
# suitescript
n
Is there a way to update the subsidiary in before submit? I tried but getting unexpected error. Otherwise, is there a way to update primary subsidiary of the customer?
t
It would be likely due to sourcing issues. Not sure if it would work but maybe try beforeLoad?
e
Changing the subsidiary beforeSubmit is not a good idea. All the other fields are sourced on the subsidiary (currency, departments, locations, items, etc.), so when you change it, lots of fields are cleared or reset.
n
Can we change Primary Subsidiary of the customer?
e
Yes, in the UI you can use the checkbox to mark the primary sub, but on SuiteScript I'm not sure how to do it.
n
On customer record? @Edgar Valdes
e
Yep, there is a subsidiaries tab in the bottom.
n
Let me look into it. Thank you.
I don't see this "Primary" checkbox under Subsidiaries sublist on the customer record. @Edgar Valdes
I think this checkbox is only shown until no transaction is posted for that entity.
e
Yes, you are right @NickSuite