- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 12:02 AM
I have a change request whose state was closed incomplete. But still active shows true instead of false.
How can I manually make active false?
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 12:50 AM
background script
var gr = new GlideRecord('change_request');
gr.addEncodedQuery('state=4^active=true'); //make sure about closed incomplete state value
gr.query();
while(gr.next()){
gr.active=false;
gr.setWorkflow(false);
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 12:50 AM
Hi,
Can you try with background script ?please let me if you need any help with this.
Thanks,
Pooja M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 12:58 AM
If you have single change request and you want to make that as false then you can use below code.
var gr=new GlideRecord('change_request');
gr.addQuery('sys_id','sys id of your change request');
gr.query();
if(gr.next())
{
gr.active='false';
gr.setWorkflow(false);
gr.update();
}
Thanks,
Pooja M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 01:00 AM
Hi Mounika,
OOB Close Incomplete choice is not available in the change_request please find the snipped below for reference.
Active field is editable for the admin, It seems like your state field is configured and you have some restrictions configured on writing of active field. If there is no restrictions on writing of active field then reconfirm that you have the admin role to change the field manually.
Also, "mark_closed" business rule on 'change_request' table changes the active field to false. Verify that it has the filter condition added closed incomplete to fix this issue permanently.
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Alok