change request

Anantha27
Mega Guru

In the change request there is one column in related lists "Affected CI's" we need to populate more than one CI in the change request without adding it manually.

6 ACCEPTED SOLUTIONS

Amit Verma
Kilo Patron
Kilo Patron

Hi @Anantha27 

 

Below posts could be helpful :

https://www.servicenow.com/community/itsm-forum/autopopulate-all-affected-cis-in-related-list-of-cha...

https://www.servicenow.com/community/developer-forum/auto-populate-affected-cis-change-management/m-...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Anantha27 

 

The logic of same work with UI action - Impacted Services / CI. If you add a Service in Impacted Services  Related Tab, it will pull the associated relation of CI and add in affected CI. But if you want to just add a CI in Affected CI tab, then you need to add manually only. 

*************************************************************************************************************
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

Ramesh_143
Giga Guru

Hi @Anantha27 !

Please go through the below link 


https://www.servicenow.com/community/itsm-forum/how-to-create-a-standard-change-template-with-multip...

 

Thanks, and Regards

Ramesh Shankarolla

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

VishaalRanS
Tera Guru

Hi @Anantha27 ,


Kindly go through the below links:

 

Solved: Re: Autopopulate all affected cis in related list ... - ServiceNow Community

Solved: How to create a Standard Change template with mult... - ServiceNow Community

 

Thanks, and Regards

Vishaal

Please mark this response as correct or helpful if it assisted you with your question.

 

View solution in original post

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Anantha27 

 

https://youtu.be/u1lsJzZYIyo

 

https://youtu.be/DbsgwqbqEdk

 

*************************************************************************************************************
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

CISITSM #ITSM #csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality
10 REPLIES 10

Ramesh_143
Giga Guru

Hi @Anantha27 !

Please go through the below link 


https://www.servicenow.com/community/itsm-forum/how-to-create-a-standard-change-template-with-multip...

 

Thanks, and Regards

Ramesh Shankarolla

Please mark this response as correct or helpful if it assisted you with your question.

VishaalRanS
Tera Guru

Hi @Anantha27 ,


Kindly go through the below links:

 

Solved: Re: Autopopulate all affected cis in related list ... - ServiceNow Community

Solved: How to create a Standard Change template with mult... - ServiceNow Community

 

Thanks, and Regards

Vishaal

Please mark this response as correct or helpful if it assisted you with your question.

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Anantha27 

 

https://youtu.be/u1lsJzZYIyo

 

https://youtu.be/DbsgwqbqEdk

 

*************************************************************************************************************
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]

****************************************************************************************************************
CISITSM #ITSM #csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality

thullurishalini
Kilo Guru
  • To populate more than one Configuration Item (CI) in the “Affected CI’s” related list of a Change Request in ServiceNow without adding them manually, you can use a script to automate this process. Here’s a basic example of how you can achieve this using a business rule or a script include:
  1. Create a Business Rule:
    • Navigate to System Definition > Business Rules.
    • Click on New to create a new business rule.
    • Set the Table to Change Request (change_request).
    • Set the When field to before or after depending on when you want the script to run.
    • In the Advanced tab, add the following script:

      (function executeRule(current, previous /*null when async*/) {
      // Array of CI sys_ids to be added
      var ciArray = ['sys_id1', 'sys_id2', 'sys_id3']; // Replace with actual sys_ids of CIs

      ciArray.forEach(function(ciSysId) {
      var gr = new GlideRecord('task_ci');
      gr.initialize();
      gr.ci_item = ciSysId;
      gr.task = current.sys_id;
      gr.insert();
      });
      })(current, previous);