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.
nlapiGetLineItemValue('item', 'itemid', x)...
We are a software company, and we sell support minutes for our software. One thing we'd like to do is update the customer record with more support minutes when they purchase those minutes. So I have added a field on the item record that designates how many minutes should be added by purchasing that item.
My plan was to execute the following lines of script 'afterSubmit' when a sales order is created...
var numberOfLines = nlapiGetLineItemCount('item');
for( var x = 1; numberOfLines >= x; x++)
{
var itemName = nlapiGetLineItemValue('item', 'itemid', x);
var itemRecord = nlapiLoadRecord('item', itemName);
var supportMinutes = itemRecord.getFieldValue('custitem_minutes);
0