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!
NSC | Default Shipping Address Creation in SuiteScript 2.0
Scenario:
A user desires to establish a new AddressBook entry and designate it as the default shipping address through Scripting within a Customer record.
Solution:
Below is a sample script illustrating the process of creating a basic address entry with default shipping setting within a Customer record using N/record in SuiteScript 2.0.
var rec = record.load({
type: 'customer',
isDynamic: true,
id: XXX //internal ID
});
rec.selectNewLine({
sublistId: 'addressbook'
});
rec.setCurrentSublistValue({
sublistId: 'addressbook',
fieldId: 'label',
value: 'Script sample label'
});
rec.setCurrentSublistValue({
sublistId: 'addressbook',
Richard James Uri - SuiteCloud | WMS Tech | SuiteCommerce Advanced
----
- NetSuite Admin Corner | New to NetSuite
- Explore the NSC Webinars Category
- Join our poll and share your ideas! We want to know what you think. Don't forget to comment and make your voice heard!
- Expand your NetSuite knowledge by joining this month's Ask A Guru Live about Advanced Accounting. RSVP on this event now!
Tagged:
1
