Catalog Task workflow activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 04:01 AM
I have a requirement that only one workflow to be used for different catalog items.
only difference in the catalog task is description field to be pupulated with respective ritm short dscription.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 04:22 AM
In the script of the Catalog Task workflow activity, just use:
task.short_description = current.short_description;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 05:02 AM
Hello @Priya Bonam
ritm.addquery('number',task.request_item); - Here you are putting filter on number but passing task.request_item - change it to "task.number".
gr.addQuery('request_item', task.request_item); - change this to only "task"
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 05:04 AM
OR @Priya Bonam
If my above corrections doesn't work, just use below script -
var requestItemShortDesc = current.short_description; // Find the associated catalog tasks var catalogTaskGR = new GlideRecord('sc_task'); catalogTaskGR.addQuery('request_item', current.sys_id); catalogTaskGR.query(); // Update the short description for each catalog task while (catalogTaskGR.next()) { catalogTaskGR.short_description = requestItemShortDesc; catalogTaskGR.update(); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 05:44 AM
your workflow is already running on RITM table then why are you querying?
Script shared by @Brad Bowman will work here and will populate RITM Short Description -> Task Description
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