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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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