BPM Add/Change to OrderDtl field not setting OrderHed field to True

When I create a Preprocessing Method Directive on SalesOrder Update to check the Hold box (OrderHeld on OrderHed) using Set Field, it fails.

I have used many different combos of conditions based on OrderHeld field of changed row equals False OR OrderHeld field of Added row equals false; OrderDtl.PartNum of changed row begins with “XXX” OR OrdDtl.PartNum of added row begins with “XXX”.

I have split it out to two conditions as well. I have even thrown in 'There is at least one Update/Added row to OrderDtl.

It will fire off a Show Message to the user to make sure the box is checked; however, it will not actually check the box when using Set Field. Also, it won’t stop showing the message even if the Hold box is checked, so I am trying to figure out that, as one of the conditions is to check for that.
Any help is appreciated. I am wondering if it is due to the DTL table trying to affect the HEAD table. Thanks for the help

Try post-processing. Here is how we have it:

1 Like

OK, you could be having a problem with the fact that you cannot set a field in the Order Header when it is monitoring the Order Detail… it doesn’t matter if you do it pre or post processing, the Order header is not included in the dataset that is being passed. This can be a problem.
What I have had to do is to look for the modified OrderDtl record and then you have to manually (with code) read and update the order header record. This is always a challenge with BPMs that have multiple record types involved.

1 Like

Suggest to use Data Directive on said table’s field

Try setting the RowMod to “U” on the OrderHed.
If you’re using pre-update and you’re setting OrderHeld without setting the RowMod to U, it won’t do anything. And since you want to trigger this when OrderDtl changes, I think it’s safe to say that the OrderHed is already saved and doesn’t have any rows with RowMod set to ‘U’. So it won’t update it.

When I do something like this, I usually check the condition in Preprocessing, and set a callContextBPMData field to true or false. Then in Postprocessing, I test that field, and do the processing of the other table. Since you are looking at OrderDtl, the ttOrderDtl table will contain records, but you don’t know if ttOrderHed will have any data in it. So you can’t rely on that.