Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Trying to change Price Level via Client Script
Hi,
We have the need to dynamically support different price levels for customers based on the 'Type' of product they purchase.
I can't seem to get the item's price level to set as expected. I've got the correct internal id of the price level, but can't set it.
Has anyone had any experience in setting price levels via scripting? Is there a trick that is needed?
Here is a snippet that I'm using:
nlapiSetCurrentLineItemValue('item', 'price', x, newPriceLevel,true);
I'm needing to execute and refresh any existing lines if/when the entity on the sales order gets changed to ensure things are priced correctly. I also have to make sure any new items entered are adjusted correctly. Therefore, I think the logic needs to be both in the Post Sourcing and Field Changed functions.