You'd think I'd know how to do this, but even after 12 years of working full time on NetSuite websites, I've never had to do this exact thing...
I have installs of Vinson and Elbrus for SiteBuilder. My client needs to have a few custom entity fields filled in when a user registers. I need to copy those to standard netsuite fields for phone, fax and leadsource.
There are three of the custom entity fields that they have been using that when a new customer registers. They were not able to add the standard fields to the old checkout so these custom ones were created. But now they'd like to not have to copy them by hand.
They have a custom field for phone number, fax number and website (they have multiple sites). I need to copy these to netSuite's 'phone', 'fax' and ''leadsource' fields. The phone and fax fields are direct copies and the leadsource field will need to read the custom website field and select from the leadsource dropdown list.
I tried and tried to get those three standard NetSuite fields (phone, fax & leadsource) to be written directly when registering by adding them to the LoginRegister.Register.View.js , the Account.Model, just like I did for the custom entity fields, but they don't get added. So, I have to go with Plan B, and read the custom entity fields that do get sent after the new registration is created.
How do I go about doing this. I tried to figure it out using User Event Script but couldn't see how to do that. Even custom code on the form itself I'm not sure how to do. This hasn't been the area of NetSuite I've focused on these last 12 years so any help in pointing me in the right direction would be great.
Thanks
Sam W.
PS - I already have bunch of code running when a person is filling in the registration form to make sure the custom entity field for phone number is filled in and correct and duplicated detection for phone number and email address. All that works great.