BPM Assistance

Hi All,

I’ve just started to create BPM’s and i’ve got a little lost with what I am trying to accomplish.

To explain, I am trying to make a BPM so when the COC Job checkbox is ticked, it will timestamp the text box underneath with the username of the user and the time that it was ticked.

image

So far I have done the following,

  • Created a Method Directive BPM on Erp.BO.JobEntry.Update

  • Created a Pre-Processing Directive

  • Created a True/False Condition using the following conditions,

  1. The JobCOCStatus field has been changed from false to true

  2. The 'below' expression is valid

dsJobHeadRow.RowMod == "U" && dsJobHeadRow.UDField<System.Boolean>("UD_JobCOCStatus_c") == true

  • I then created a Set Field with the following
    Set the JobCOCTimestamp field of the changed row to the 'below' expression
Session.UserID + " - " + DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss")

What’s happening so far is whenever I tick the checkbox, nothing happens, but once I untick the checkbox a timestamp will fill into the text box.

However, I have noticed that once I do this, if I change another separate field and then click save, the timestamp will update again.

What is the best way of achieving what I am trying to do? I’m not experienced with BPM’s so feel that I am getting lost rather than making progress.

Thanks!

Hi Gary,

The Update method will be triggered on saving the job. If you check your checkbox then save the record does the timestamp appear?

Many thanks,

Nathan Willey

2 Likes

Thank you for the comment,

It does appear when I save the Timestamp now,

After more playing around I realised that the Set Field action had to be connected to the left side of the If Condition. I didn’t realise that the sides determined if True or False.

This is now working as should!

2 Likes