Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
setLineItemValue() doesn't trigger field change for amount fields
so I have this code that removes and adds new line in Invoice via aftersubmit user event script.
It looks like this:
record.removeLineItem(sublist, linenum);
record.insertLineItem(sublist, linenum, false);
record.setLineItemValue(sublist, "item", linenum, item);
record.setLineItemValue(sublist, "description", linenum, description);
record.setLineItemValue(sublist, "rate", linenum, rate);
....
nlapiSubmitRecord(record, true);
If like this, my script will run successfully but the Amount and Tax Fields, and Gross Amount field is not automatically populated.
if I add lines to set the amount, gross amount and tax code like this:
record.setLineItemValue(sublist, "amount", linenum, newAmount);
record.setLineItemValue(sublist, "taxcode", linenum, taxcode);