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.
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