- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 07:15 PM
Hi
My Workflow just creates as catalog task whenever a RITM is created. Now
How to set values of RITM State value based on Catalog task state value in a workflow
Like if Catalog task state is Closed Complete, RITM state should be closed Complete
if Catalog task state is Closed Incomplete, RITM state should be Closed Incomplete
With regards
Solved! Go to Solution.
- Labels:
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 07:40 PM
Hi,
Please follow the below steps:-
Step 1:- In Work flow after catalog task activity insert an run script activity and Enter the following code below.
var catTask = new GlideRecord('sc_task');
catTask.get('request_item',current.sys_id);
if(catTask.state == 3){ //'3' for state closed complete in catalog task table(sc_task)
current.state = 3; //'3' is ritm close complete state value.
current.update();
}
//Like wise you can generate other state value conditions....
If i was able to solve your query, please mark my answer correct and helpful.
Thanks & Regards
Prasant Kumar sahu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 03:25 AM
Hi,
if you wish RITM state change on every TASK change then ensure BR runs always
If you wish RITM state to change on last task then in script check if this task is the last task which is getting closed and then update RITM
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader