"Updated" and "Updated by" fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 05:26 AM
Hi all!
Currently "Updated" and "Updated by" fields only reflect when there is a field change.
I would like to have any task's (incident, change, catalog task, etc.) "Updated" and "Updated by" fields reflect (1) when a work note or comment was added and (2) who added the work note or comment.
Idea on how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 05:35 AM
try this..
write a br that runs after comment or worknotes changes(for these tables only) and force update the record in that BR. that might do the trick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 05:43 AM
Thanks, Anurag. I actually saw one of your responses to a similar question! Am I missing anything below? (Note: I'm very new to scripting!)
CONDITION:
current.comments.changes() || current.work_notes.changes()
SCRIPT:
current.sys_updated_on=gs.nowDateTime();
current.sys_updated_by=gs.current.userID
WHEN TO RUN:
after insert/update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 05:56 AM
SCRIPT:
current.setForceUpdate(true);
rest all okay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 06:03 AM
Hi Jessica,
I would suggest not reusing these fields as values are set by ServiceNow itself and will likely change at other times. You can easily create new fields on relevant tables for this.
You could also use metrics to capture when and who added every comment which becomes data for reporting and can show in the metrics timeline. This really depends if you need to know things like volume and frequency of updates
Simon