Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Help set a default value for Department
Hello,
I spoke with Netsuite support about setting a default value for the "department" field on a custom form. They advised that I could run the following script as a User Event Script.
I don't know how to script or set this up.
Outcome:
Set department on a sales order to a default value: department field = icandy Creative
Code Provided by Support:
*** START CODE ***
var customForm = nlapiGetFieldValue('customform');
if(customForm == 100) // You may simply replace '100' with the internal ID of your custom form.
{
....place your code here....
}
*** END CODE ***
My Code:
// *** START CODE ***
var customForm = nlapiGetFieldValue('customform');
if(customForm == 117) // You may simply replace '100' with the internal ID of your custom form.