Autofill CI in INC ticket based on submission by System Admin

Philip Conforzi
Tera Contributor

Hello ServiceNow Community,

 

I hope you're doing well.

 

I'm currently trying to create a business rule that will run when a system admin submits an incident ticket. Ideally, once the sys admin submits the INC, the Configuration Item field will auto populate with the designated CI (in this case, Demoshield)

 

Please see my code for the business rule below and let me know your thoughts!

 

PhilipConforzi_0-1706378222285.png

 

1 ACCEPTED SOLUTION

Sainath N
Mega Sage
Mega Sage

@Philip Conforzi : In line 8 of your script, you are checking sys_id against the name field in your query. Could you replace “name” with “sys_id” of your script or change the input and pass name instead of sys id value.


option 2 : If you have the sys_id value of your ci you can simply use below instead of glide recording again…

 

current.cmdb_ci = “paste_your_sys_id”;


Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

 

 

 

View solution in original post

4 REPLIES 4

Sainath N
Mega Sage
Mega Sage

@Philip Conforzi : In line 8 of your script, you are checking sys_id against the name field in your query. Could you replace “name” with “sys_id” of your script or change the input and pass name instead of sys id value.


option 2 : If you have the sys_id value of your ci you can simply use below instead of glide recording again…

 

current.cmdb_ci = “paste_your_sys_id”;


Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

 

 

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Philip Conforzi 

 

Practically it is not a good use case that CI need to auto-populate, bcz there are OOTB BR which  run on basis of CI and auto populate the assignment group. 

*************************************************************************************************************
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 for your reply!

 

Yes, understand your point for sure.

 

This is just me playing with my PDI because I'm a new developer. I'm trying to learn as much as I can as fast as possible.

Okay mate, got your point. Keep Learning N Keep Growing. 

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

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