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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
MISSING_REQD_FLD error when SS 2.0 script triggers SS 1.0 user event script that creates child custo
Here's my scenario:
I have a custom record type that's a child of transaction records, meaning I have a List/Record field that references a transaction and I checked RECORD IS PARENT. I also made this field mandatory. Let's say the field ID of this field is custrecord_transaction. Let's also say we have a free-form text field with the ID custrecord_text. On the transaction type, I enabled child record editing.
I have a SS 1.0 user event script that creates a child record before submit. The script looks like this:
function beforeSubmit() { var salesorder = nlapiGetNewRecord(); salesorder.selectNewLineItem('recmachcustrecord_transaction'); salesorder.setCurrentLineItemValue('recmachcustrecord_transaction', 'custrecord_text', '1'); salesorder.commitLineItem('recmachcustrecord_transaction'); } 0