- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:01 PM
Hello there. We have a few RITMs, Stage = Completed & State = Work in Progress. All Tasks are Closed Completed. How can you change the State = Completed if the option is greyed out please? Thank you.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 05:36 PM
Quick solution, from Support HI
Log in as admin > Access the Requested Items list > Click on cog wheel to Customised list columns > add State field to list > change State from WIP to Closed Completed

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 01:26 AM
Hi
To correct data in Production, for records, that have to be "corrected against" normal behavior, you best write a script in any sub prod instance and test it good, to be sure that it will do what you expect.
Then copy the script (even via clipboard) and execute it on Prod.
You can navigate to "Fix scripts" which are intended for exactly cases. They also log that they ran, and when. Even, that you do not execute them twice, which is often critical.
Have a brief look ar the ServiceNow docs online, to read about Fix Scripts.
Let me know if that answers your question and mark my answer as correct and helpful.
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 10:01 PM
Hi
Please write a business rule on sc_task table on before insert update
and in filter condition select state is close complete. I also attached screenshot of my code into attachment
Now in advance section
var flag = true;
var gr = new GlideRecord("sc_task");
gr.addQuery("request_item",current.request_item);
gr.query();
while(gr.next())
{
if(gr.state!=3)
{
flag = false;
}
}
if(flag){
var gr = new GlideRecord("sc_req_item")
gr.addQuery("number",current.request_item)
gr.query();
if(gr.next())
{
gr.setValue("state","3");
gr.update();
}
}
please mark my answer as correct and helpful
Regards
Virendra Mali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 05:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 08:12 PM
I managed to remove the javascript parse error. However, can you please advise what your business rule does? Will it allow me to change the few RITMs where State is Work in Progress to Completed? Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 08:36 PM
Please add one more } after line 25.
Thanks,
Saji