Hello forum!
My colleague and I are trying to create a BPM for the Unit Price of a Line item in the Sales Order Entry. The BPM is supposed to keep the Extended Price the same no matter what the Order Quantity of that Line Item is changed to. This would work by changing the Unit Price. So if the Unit Price was 10 and Order Quantity was 4, that would make the Ext. Price 40. We want it so if you change the Order Quantity to 2, the Unit Price would change to 20 so the Ext. Price would still be 40.
We are working on a Pre-Processing Method Directive on Erp.SalesOrder.ChangeSellingQtyMaster.
Our Design:
Our expression:
When we test it, we just end up getting this strange message that asks if we want to retain the current unit price. We click no, but the unit price just seems to change to zero when it should change to 20.
Is there something within the business logic of the system that is throwing this message? It seems kind of strange that this wont work. I even tried a simple expression of adding 2 to the Unit Price whenever the Order Qty changes. I tested this by changing the Order Qty of a Line Item with a unit price of 10. The new Unit Price of 12 actually shows up on that strange message that pops up but when you click yes, the unit price doesn’t change and stays 10. When you press no, the unit price changes to 0. So it seems like this weird message is preventing even that simple expression from working?
We did a trace of the process to see what this message was. It is the highlighted parameter at the bottom of the picture.
It has a “c” at the beginning of the name which is leading me to believe that it is custom, so created by somebody at the company before us? The thing is, we cannot find this custom message anywhere. So we are wondering if this is a message from the system because we are breaking some sort of Business Logic?
We have been stuck on this for quite some time now and figured we should try our luck with the people on the forums! Anything at this point would be helpful.
Thanks in advance!