BPM to firm and unfirm releases (Sales Order Hold)

I have added a check box to the Sales Order Entry form. When the Save button is clicked, we would like a BPM to check whether or not the check box is checked and if it is, unfirm all the releases for that order. If it is not checked, all the releases should be firmed.

I have the trigger part working, but I am not having any luck with changing the FirmRelease field on the release records for that Sales Order.

Note: this process happens after the order has been entered. No changes are being made to the order other than the checkbox being checked.

I tried several arrangements with the Setters and even found some code online but it did not work. Any assistance would be appreciated.

Since the releases have already been created, when you open the Sales Order those Release datasets aren’t being pulled in… so you need to call releases from OrderRel table and NOT ttOrderRel. This will require some code.