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
Sales Order SuiteScript - Department based on Customer Selected
I'm sure this is a very basic question for advanced JS programmers, but I'm a newbie...so if someone could point me in the right direction that would be great.
Problem: I want to automatically populate the "Department" field on a Sales Order transaction form based on the Customer selected.
My Proposed Solution:
1. Created a custom field for the customer record called "custentity_cust_category" of type list/record that is sourced from the same list as the Department list. (this worked for me so far)
2. Create a Client SuiteScript that looks like this:
function postSourcing()
{
//set value of "department" for sales order equal to value of "department" from the customer record
0