Once the customer is on hold, I’ve set the firm release field to false on all rows. When I click on the order release tab, I can see that the firm release checkbox changes to false. So that part seems to work.
The issue I’m having is that when I close the sales order and go back into it, I see the firm release is checked again, even if I click save before closing the sale order.
A lot would depend on when you are setting this. The customer credit hold can be a bit tricky by itself, but it sounds like you are visibly seeing the result you want at least. What method is the BPM attached to?
Ok, that’s a new one for me, I’d never seen the MasterUpdate before, but I checked and indeed it’s there. Learn things all the time
Now I have found that the tt tables only contain records that have actually changed. So I am assuming you are changing an OrderHed field somewhere as well as an OrderRel field? (supposedly, changing the OrderHed flag makes it part of a tt table, so that’s probably a stupid question by me )
Because I have dealt with sending emails to people when an Order is taken off credit hold, either directly OR by the Customer taken off credit hold, I’m more used to writing custom code for dealing with it.
I assume you are only dealing with directly putting an Order on Credit Hold, not by having a Customer (and all associated Orders) be put on Credit Hold.
Being a stubborn writer of code, I’d check to see in PreProcessing, if the Order was put on Credit Hold, and set a CallContextBpmData field accordingly. Then in PostProcessing, I’d check that CallContextBpmData field and see if I needed to loop through all the OrderRel records and change the field. I don’t think you can set the value of a field on all the records with a simple Set Field function. Again, I could be wrong. There’s probably a better way, maybe the Update Table By Query function, vs using Custom Code. In fact, maybe that’s all you need to change, is use Update Table By Query instead of Set Field, giving the OrderNum and setting all OrderRel values for FirmRelease to false.
Thank you for taking the time for giving me a detailed response. I really appreciate it.
I tried doing the update by query function and I get the same results. I think what is happening is that the field is marked unfirmed at the same time the “customer is on credit hold” flag show up. It’s not writing the change to the DB. If I manually click on save after that popup window, then nothing happens. If I make a change to another field like the PO field and then click save, then the unfirm release actually updates the DB, and everything works as expected.
Is there anyway to force it to save through the BPM?