Change Management

Pooja
Tera Contributor

Hi Team,

 

Whenever we have the short description in Add network switch to cabinet I want to close all the active change request

state as to be 'closed'.

 

Kindly help me on this

1 ACCEPTED SOLUTION

Hi @Pooja 

 

2 Ways

 

Either for these case make the close code and notes as Standard and populate those values via Flow or script

 

or 

 

Make them NON Mandatory (which is not a good case).

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Pooja 

 

Greetings!!

 

How you are tracking or managing the short description in Add network switch to cabinet, is this part of change or on change?

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Pooja
Tera Contributor

Hi Atul.

 

It is part of change , I'm tracking from the change request table

 

Thanks

 

Hi @Pooja 

 

You can do via Flow Designer or client script.

 

If Short description == Add to cabinmate

set 

state = Closed

 

or Business Rule 

 

var gr = new GlideRecord('change_request');
gr.addQuery('short_description', 'XYZ');
gr.query();

if (gr.next()) {
    // Update the change record to set the state to Closed
    gr.state = 3; // 3 corresponds to the 'Closed' state, change it accordingly if different
    gr.update();
    gs.log("Change record with short description 'XYZ' has been closed.");
} else {
    gs.log("No change record found with short description 'XYZ'.");
}

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thanks @Dr Atul G- LNG 

 

But the close codes and close notes are mandatory