I need to run some business logic if a user lowers a price in the Sop Transaction Entry window, I am having trouble with the form event structure.
The issue is recording the 'before' price, so that in the Validate event I can compare the 'before' and 'after' price to see if it has been lowered.
For existing lines, I am able to record the 'before' price in the LineEnterAfterOriginal event. But for new lines, that fires too soon. They enter an item number, the price field populates, they tab to it and lower the price. My 'before' at this point is $0, that's the value when they have entered the line. I tried using Dynamics.Forms.SopEntry.SopEntry.LineScroll.UnitPrice.Change
but that causes a really weird effect if I reference Dynamics.Forms.SopEntry.SopEntry.LineScroll.UnitPrice.Value in the event handler. The effect is that the first line in the scrolling grid does not show up, it is mostly blank. I can send screen shots, if you'd like.
I tried using
Neither of these events fire at all.
1. What's wrong with the 'change' event? If I can get that working, I'll be OK.
2. Why don't the 'enter' events fire? If I can get them working, I might be OK.
3. Any other way to solve the problem? I need to set an order hold if the price is lowered on a NEW item.