How to create a problem record from a Unsucessfull change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 09:31 AM
Hi ,
I need to create a problem record from a unsucessfull change, and that problem record need to link in the change related record, how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 09:41 AM
Do you need help with the code or the approach ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:16 AM
The below code i have written in after update business rule in change table , it is creating record, How the record will show in related list of change as below screen shot, what to do for it?
var prob = new GlideRecord("problem");
prob.initialize();
prob.description = current.description
prob.cmdb_ci = current.cmdb_ci; // You may need to adjust this field based on your configuration
prob.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 03:01 AM
It is required M2M relationship.
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 05:36 AM - edited 11-30-2023 06:04 AM
Can you please share the WHEN TO RUN section of your business rule? I just need to understand in which condition on Change, you are trying to create problem so that I can replicate the same & try it on my PDI & help you with script.
Meanwhile I would suggest you to go through below article as I am pretty sure if you implement correctly it would work -
https://www.servicenow.com/community/developer-forum/relationship-between-change-request-and-problem...
You need to start with the part where it says 'So, in order for you to see any information in the "Problems" related list'.