SOE order going back on Credit Hold

Hi

We currently have an updatable dashboard to release orders off hold via the credit override flag.

The problem is when we have cancelled lines on an order. The user is able to tick RTF on the release level by ticking twice when the order is on credit hold.

I created a BPM on a data directive orderrel table in transaction to set the field as false based on the following condition > RTF has changed from false to true AND number of rows in query (customer.credithold = true) is not less than 1 with a separate condition of query (creditoverride = false) is more than 0, then set field orderrel.readytofulfil to False.

This BPM however stops RTF being ticked when credit overridden sending the user in a loop.

I feel this is because when there is a change even RTF being ticked on release it places the order back on credit hold.

If anyone has any suggestions on either to stop the order going back on credit hold especially when RTF is ticked or something i could try differently to stop RTF being overidden that would be great.

Regards
Kirsty

Ignore this post. There was coding in customization which was adding up the line value which therefore was not taking into consideration cancelled lines. This has been changed to point to the orderhed total.