BPM to prevent a change of date

Hi
Ive tried to create a bpm which allows a Promise Date to be entered on a SO Line. But once Acknowledged is ticked (ud field) then the Promise date cannot be changed.

I thought this would be straight forward, but all different attempts have failed.

Any advise greatly appreciated :slight_smile:

You might want to try an In-Transaction Data Directive on the PORel table with a first condition to query the associated POHeader table checking the state of the POHeader.Confirmed; then a second condition of PORel.PromiseDt has changed from any to any, and if both are true then throw the error.

Test this thoroughly… generally speaking the “changed from any to any” does NOT catch an initial value (technically changing from NULL to something). This error will also not occur until the user clicks the SAVE button.

Thanks although this is for the Sales Order lines…

Duh… my bad. Sorry! If your Acknowledged field is on the OrderRel table, you can probably use the same procedure (except with the In-Trans DD on the OrderRel table, and just a widget to test that field’s value).

One thing that you might have to work around, is that dates on lines and releases are often implied from the level above. This happens during various processes.

If the date on the release is blank, then use the date from the line. If the date on the line is blank use the date from the header.

So if the date on the release was blank, changing the date on the line wouldn’t change the value in the date field on the release record (it would remain blank), but processes that use that date would use the value from the line (or the header).

Thanks for your replies guys.

Acknowledged is a UD field on the Order Dtl.
Promise Date is a UD field on the Order Dtl.
The promise date is not linked to any other dates on releases etc.

This is why I believe it would be an easy bpm / directive change