When Change Request Get Closed closed related incident

Sagar_pawar
Tera Contributor

Hello All,

I want to close the related incident on the change request form when the change request is get closed .

can anyone please guide me on this?

Thank You.

5 REPLIES 5

Basheer
Mega Sage

Hi @Sagar_pawar ,

You can write an after business rule on change_request table to achieve this:

var inc = new GlideRecord("incident");
inc.addQuery("change_request",current.getUniqueValue()); // check for the proper column of change_request
inc.query();
while(inc.next()){
inc.state = "closed";
inc.update();
}

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

BharathChintala
Mega Sage

I think all incidents should auto close OOB. Cgeck once

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

Hello @BharathChintala  i checked its not closed yet