- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 04:44 AM
Hello Team,
I have created new Catalog item and workflow. But here I need whenever I change state of SC Task then automatically RITM state has to be changed.
Thanks,
JRY
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:18 AM
Hi,
Can you remove the condition for state changes to PendingValue?
BR: After Update
Condition: State changes && current.request_item.cat_item == 'yourCatalogItemSysId'
Script: whatever state changes on sc_task same to be updated in RITM
var gr = new GlideRecord('sc_req_item');
gr.get(current.request_item);
gr.state = current.state;
gr.update();
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:26 AM
Thanks Ankur, it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 04:15 AM
Hi Ankur,
While using the script i am getting below error in condition
Condition : State changes && current.request_item.cat_item == 'yourCatalogItemSysID'
JavaScript parse error at line (1) column (14) problem = missing ; before statement (<refname>; line 1)
can you please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 03:31 AM
Hi Ankur,
What if we have multiple Tasks,how will it work.
Thanks