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
Updating Price Level field Sales Order, will attached script fail after X line items?
I have tested the attach script and it works. But before I deploy the attached script to the Sales Order, I was hoping that someone could review my script and comment to the NEGATIVE potential of the script or suggest a better optimized script. (ex. after 200 items, the script will not update line items).
Overview
Added a custom select field mirroring the (Internal ID) values of the Item Price Level Field.
Script triggers when end user selects a value from the Custom Select Field.
function setPriceLevelOverride(type, name){ if (name == 'custbody_plo') { var PriceLevel = nlapiGetFieldValue('custbody_plo'); for (var i = 1; i <= nlapiGetLineItemCount('item'); i++) { nlapiSelectLineItem('item', i); nlapiSetCurrentLineItemValue('item', 'price', PriceLevel, false, true); nlapiCommitLineItem('item'); } return false; } } 0