Discussions
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.