Can't get BPM to write to UD field for an added RcvDtl record

I am trying to develop a BPM that will write the current time to a datetime UD field I’ve added to the RcvDtl table through use of the BpmFunc.Now() expression whenever a receipt line is marked as Received (i.e. RcvDt.Received changed from any to True).

Through a data directive on that table I’ve been able to successfully write to the field when an existing line is updated, but I cannot get it to write the timestamp when a new line is added. I’ve tried doing it in the Data Directive and also pre-processing on the Receipt.UpdateMaster method without any luck.

Any tips? Something I could be missing?

Also, not sure if related or not, but when I run a trace on the receiving process, the dataset for the RcvDtl table does not include my timestamp UD field, but it does include seven other UD fields I added to that table after the one I’m trying to write to.

I think it is arrived when it is added and then updated when it is received, so that condition will never happen.

So you think I don’t really need that second condition?

The trace does show the RowMod as “A” on the UpdateMaster method.

I would use either alone, just not both together.

May need to look deeper into my trace, because I did just remove the second condition and also added an info message to display when the first condition is true. It did not appear when testing, so that does indicate that my condition isn’t triggering.

Solved this by changing my condition to this:

Thank you @gpayne for drawing my focus to the condition!

1 Like