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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
NSC | SuiteScript: Setting Default Billing in Customer
Scenario:
A user wants to create a new AddressBook subrecord through script, specifying a value for the Address Label and designating it as the default billing option.
Solution
The sample script below demonstrates how to create a simple addressbookaddress subrecord in a customer record using N/record in SuiteScript 2.0
var myRec = record.load({
type: 'customer',
isDynamic: true,
id: XXX //internal ID
});
myRec.selectNewLine({
sublistId: 'addressbook'
});
myRec.setCurrentSublistValue({
sublistId: 'addressbook',
fieldId: 'label',
value: 'sample label'
});
myRec.setCurrentSublistValue({
sublistId: 'addressbook',
fieldId: 'defaultbilling',
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!
Tagged:
0
