Discussions
Overwrite default address on contact record - script
I have copied the code below (I have completely split function into two distinct iterations in an attempt to find the problem.
Scenario: Create new contact. When contact id created from blank record - company is entered and script below behaves as desired( select primary address and populates contact record with primary rather than default billing address of customer on contact record. This scenarios works fine.
Scenario: Contact record is created from customer record. Company and address are pre-populated on record load by Netsuite functionality. Desired result is for primary address for company to replace default billing address of company. Script fires as expected and executes as expected all the way until it writes the line item and commits. It does not commit the new line item and record saves with the default billing address for customer. I have tried it as a beforeSubmit - same result. Can't do it as afterSubmit as it tries to override the new record and throws an error. Any help