Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Trouble updating 'phone' with suitescript
I've created a SuiteScript that's run on 'create' and 'edit'. The concept is to take values from the main NetSuite fields and update custom entity fields that my website can use (without having re-write the entire site to use NetSuite fields)
Here's the SuiteScript code:
var record = nlapiGetNewRecord(); var email = record.getFieldValue('email'); record.setFieldValue("custentitymember_email",email); var line1 = record.getFieldValue('line1'); record.setFieldValue("custentitymember_address1",line1); var title = record.getFieldValue('title'); record.setFieldValue("custentitymember_title",title);The 'email' and 'title instances of 'record.setFieldValue' work just fine, and when I view my Contact I see that my custom fields have been updated to match the NetSuite fields.
0