BPM Close Order Update Table Field

I am attempting to write a BPM that will update the OrderHed table’s UserDate1 field to the current date whenever an Order is Closed. I have tried using Method Directives on the SalesOrder CloseOrder directive and Update directive with the SetField action, but neither one was successful. The CloseOrder BPM seemed to stop the Closing process altogether.

Is there a better way to update a field during the Close Order process?

A data directive on the OrderHed table is a good way to do this.

Two Widgets in a Data Directive (as stated by @Asz0ka)… Widget 1 is a condition widget that looks for a change in value from false to true. Second widget (off the true side of widget 1) put a SETTER and set the date field to Today.

1 Like

I’ve tested the Data Directive with a condition and an Update Table By Query widget. The Update widget has a query which pulls the Company and OrderNum to use for mapping, and binds the UserDate1 field to BPM.function Today(). I tested it set to updated the changed rows and then the updated rows but neither actually set the UserDate1 value.

The set-field widget (after the condition widget) should be all you need. Are you doing an in-transaction data directive?

Ah, that was the issue; I was using a Standard directive.

Thank you all, its working now!

1 Like

Hi Daniel,
Can you share with screens shots your solution to this one, I’ve got something similar and very curious on how you did it.