Hello,
We are looking to create a script to send an email when no changes have occurred in a CAPA record within the last week.
We were thinking of using the Change Log, but then realized that the 'Last Modified Date' that appears in the 'owner and change summary section' is actually what we need.
How can we get, through scripting, to the 'Last Modified Date' in a record?
Solved! Go to Solution.
Solved by dvirh. Go to Solution.
Do you mean no changes in the workflow state or no changes to the item record? I was thinking....
item.workflowActions[i].timeStamp
where i=0 is the last state of the record?
When you click edit to a record and save without making any changes, it may or may not change the "last modified" date. It would depend if you have any on -edit scripts.
I only see a createdDate on the descriptor. If the items are revision controlled, then the createdDate might help.
Otherwise, you might be able to use the workflow history:
println(item.workflowActions[0].timeStamp);
Hello!
Thanks both for the input!
I our business case, the change may or may not be related to a WF action. This workspace is basically an online form, and users can remain in the same stage making updates for several days, so the only change logged would be an Edit action.
Thus we want to send reminders in case not even an Edit has happened in the past 9 days, however, we are struggling to get to the Change Log or Last Modified Date to see this.
Please let me know if this is possible or helps clarify.
Thanks!
Good question!
There is a workflow, however, the form is basically living and breathing, since this it is an online form where the team is making updates as they do investigation to solve problems. Thus, they may not submit for review or approval, until done with their research, but multiple team members are contributing to this form.
Thus, any changes are not necessarily committed to the WF Actions, we want to make sure that the teams doing research are being active and updating their findings, even if they are not ready to submit yet. Does that help clarify?
Sorry for the late response Wendy.
You can easily get this value by using item.descriptor.lastModifiedOn
As Tony noted our help file doesn't seem to reflect this option. I will make sure to update the help file to include this option.
Thanks Jason! Since we are considering fields that can be updated at any point (not necessarily in a pre-defined sequence) we need to look at the whole workspace changes. However, will keep an eye on this solution as it is definitely applicable to other business processes.