I’m trying to pass SalesCatID and ProjectID from the Order Line, when the Complements button is clicked, into the new lines that are created based on user’s complement parts selection.
Debugging shows me that the method that triggers when clicking OK after selecting complement parts is CreateOrderDtlComplements and new lines are created as selected. However, in the dataset no lines or Releases ever show a RowMod value other than blank.
In a post-processing BPM on that method I can update lines with the values I want to, except it updates every line on the sales order and not just the newly added lines.
How can I restrict the update to the new lines being added if there’s never a RowMod = “A”?
In the post-processing dataset, does the new OrderDtl row with the compliment have an OrderLine? A lot of times with methods that create something without using GetNew, the new OrderLine will be 0 in the Post-Processing Dataset. If it is, you can use that as an identifier.
Nope, it only displays the new line numbers after creation of them.
I’m currently trying to pass through the Line where I’m getting the other values from and seeing if I can do a comparison to have it only update the lines that are greater than that one.
Is the selected complement partNum one of the variables (or part of the dataset) in pre-proc? If so, you should be able to nail it down with your idea of OrderLine > Current OrderLine plus the selected PartNum == OrderDtl.PartNum
I was able to get it to update the two fields for only the added complement part lines, except it looks updated in the UI but they aren’t actually being written to the db.
(Where Line 5 is my new line and Line 6 is the selected complement part line, even after clicking the save button in the UI.)
If I update my post-processing BPM to also set the ds.OrderDtl.RowMod = "U" then it duplicates my complement parts line: one with the values saved and one without.
It does not. This particular method seems to be built like everything happens inside a box, then it spits out the finished results, and you have no insight into how it did it or what it’s doing.