Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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.