OK, so I run into this from time to time, and I want to figure it out. When does a row register as updated / changed in a method directive? It seems that updated rows are not always properly recognized. Here is my example:
I create a simple updatable BAQ that allows updates to the ReqDate on the Sales Order Release. To get the update to work correctly, we have to include the OrderHed, OrderDtl, and OrderRel tables.
(We add a criteria on the OrderRel to limit our selection to open releases.)
We also have to include certain columns from each of these tables:
We select the ReqDate on the OrderRelease as updatable.
We can see that the SalesOrder UpdateExt Business Object is used.
We analyze and test the BAQ, and it works like a charm.
We create a Pre-Processing BPM on the SalesOrder.UpdateExt Method called TEST_OrderRel
(The other BPM has been disabled–didn’t want to delete it for this example.)
The new BPM includes an initial message letting us know that it triggered…
and displays the Order Release ReqDate value for the Updated and Unchanged Rows…
Next is a conditional that tests whether or not the OrderRel.ReqDate value has been changed…
And we have included a message for both True and False Conditions…
We save and enable the BPM, then return to our BAQ.
In the BAQ, we change the OrderRel_ReqDate on the first row from 10/16/18 to 12/31/18.
Pressing OK, highlights the changed row, and we can see that it now has the 12/31/18 date.
We press the Update button and get our first Message from the BPM indicating that it triggered successfully…
Note, however, that the Updated row value for our ReqDate is blank, while the Unchanged row is reporting the 12/31/18 date. Pressing OK to dismiss the first message, we see the Message after the conditional indicating that the False branch was taken…
The BMP is not recognizing that the data on that row was changed. Nonetheless, the update completes and when the BAQ is refreshed, the 12/31/18 date persists.
So what am I missing here? Shouldn’t the BPM recognize this row as being updated and changed?