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.
nlapiSetFieldValue script to run only once on create?
Just a simple question because I'm still getting my feet wet with Suitscript. I made a script to set the bank account on refunds automatically.....
setRefundAccount() { nlapiSetFieldValue('account', 115, null, true); }It is set to the form on Page INIT. I just wanted to know, how would it be set up to just set the field once on creating the record and then not reset the field when the record is reopened again? Example: If the field had a different account initially and someone reopened the record and wanted to keep the original field.
Thanks
0