Message in SCTASK Worknotes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 02:25 AM - edited 10-16-2023 02:26 AM
Hi Team ,
We have requirement that
You can see here 2 sctasks got generated as per the WF .
For eg
1 . SCTASK0001
2 . SCTASK0002
Our requirement , In the 2nd SCTASK Work notes we need to display message ( ' Please review the attachment on the # SCTASK Dynamically [ Here 1st SCTASK number should come ] ) .
I.e - Please review the attachment on the SCTASK0001
How achieve this requirement please help me with screenshots for better understanding .
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 03:29 AM
so in the 2nd catalog task activity you can use advanced script and use this
var gr = new GlideRecord("sc_task");
gr.orderBy("sys_created_on");
gr.addQuery("request_item", current.sys_id);
gr.setLimit(1);
gr.query();
if (gr.next()) {
task.work_notes = "Please review the attachment on the " + gr.number;
}
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 04:05 AM - edited 10-16-2023 04:06 AM
Hi @Uday Soni05 @Ankur Bawiskar
- Thanks for your quick response.
Sorry that I didn't mentioned before .
These behaviour should be only for a particular catalog Eg ( Laptop ) , not for all the catalogues .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 03:50 AM
You can create workflow scratchpad variable in task1 and use it in task 2
Like below screenshot
Task1 Activity:
Task2 Activity:
Task2 Comments and Work Notes:
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Uday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 04:07 AM
Hi @Uday Soni05 @Ankur Bawiskar
Thanks for your quick response.
Sorry that I didn't mentioned before .
These behaviour should be only for a particular catalog Eg ( Laptop ) , not for all the catalogues .
Could you please provide me the updated solution.
Add Products