Posted: 20 May 2017 2:49 EDT Last activity: 22 May 2017 11:24 EDT
How can I confirm if an assignment is COMPLETED by a user?
I need to get a list of assignments completed by any user at a given day.
I am using Declare Trigger with Committed Delete on Assign- Class (with an understanding that everytime an assignment is completed it gets deleted from the assign table as per our system purging mechanism).
However, the issue is Assignments gets deleted also in case of transfer or reassign- for instance when a user picks an assignment from a WB- the assignment gets deleted from Assign-Workbasket and is added to Assign--Worklist; also in case of Screen Flows where back to back assignments are created and deleted for user.
How can I filter out such cases so that I only have assignments ACTUALLY COMPLETED by the user. I have tried to look out for properties that store the value for the Action Label on newAssignPage- whether it was a Transfer, or Completion, or Reassign etc- but couldnot.
One way could be to see if the status of the case has changed. In our application, if for an Assignment AssignedOperatorID and Status both changes- it means an assignment is completed. (But again, this solution might be an issue in case of Spin Offs, also am unsure how can I track this).
If you can identify a property within the assignment object that gets set to a particular value when an assignment gets completed, you could use a declare-expression on that property (or a declare-change).
A concern I have though is, just because you OBSERVE some particular property behavior today and key off of it as described, unless it's a published interface, it could change in the next version.
Perhaps a safer way to do all of this is to use a post action on the flow actions you are particularly interested in, and have that post action store a record that the action was completed.