- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 09:50 PM
Hi Team
In ritm whose state was closed incomplete , closed complete , closed skipped . But still active shows true instead of false.
Instead of making manually make active false , can anyone please suggest BG script or FIX script .
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 10:20 PM
Hello @nameisnani
Greetings!
Since this is only making active false, you can bulk update from the list itself. If the no. of such records are less
Ctrl+Shift and click on down arrow to select all the records in the list and update Active to False.
(Updated by will be your name if that's not a problem).
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravi chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:21 PM
Glad to see your problem has been resolved!
Your original ask was fix script/background script, which I have provided the same.
As per the new features of community, you can accept multiple solutions as correct!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 10:02 PM
Hi @nameisnani
Greetings!
Try below script.
var ritm=new GlideRecord("sc_req_item");
ritm.addEncodedQuery("paste the query"); //paste query from filter
ritm.query();
while(ritm.next()){
ritm.setValue("Active", false);
}
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravi chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 10:02 PM
Can you try this:
var gr = new GlideRecord("sc_req_item");
gr.addEncodedQuery("stateIN3,4,7^active=true");
gr.setLimit(1); //remove this for all the records
gr.query();
while(gr.next()){
gr.active = "false";
gr.update();
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:21 PM
Glad to see your problem has been resolved!
Your original ask was fix script/background script, which I have provided the same.
As per the new features of community, you can accept multiple solutions as correct!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 10:20 PM
Hello @nameisnani
Greetings!
Since this is only making active false, you can bulk update from the list itself. If the no. of such records are less
Ctrl+Shift and click on down arrow to select all the records in the list and update Active to False.
(Updated by will be your name if that's not a problem).
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravi chandra.