How to access Activities field value from de-duplication tasks using script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 03:26 AM
Take a look at the highlighted field in the screenshot below. This is a de-duplication task record.
How can I access this field using a script.
ex. I want to write a background script and print the value in the that field, how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 03:31 AM
That's the activity log, showing you what was entered in the work notes. It is against any best practice to update the journal fields through script, because they are there for audit reasons. You can just update the work notes again with the value you want in there. It will add them on top of the current one.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 04:03 AM
Hello @HrishabhKumar, Work Note values can be accessed using getJournalEntry() method. for e.g.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 04:05 AM
it's an activity log for work_notes field on your form and shows what was entered in it
You can access the field using glideRecordObject.work_notes.getJournalEntry(1)
Can you share what background script you wrote and what's not working?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader