- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:26 AM
Hello All,
Whenever major incident is created, problem record will be auto generated. Now that Problem record should be auto populated in related records. Can you please help me in this. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:50 AM
Hi Srinidhi,
have a before insert business rule on incident with condition as priority is p1
have below script in the business rule
var gr = new GlideRecord('problem'); gr.initialize(); // map whatever fields you want here from incident to problem gr.description = current.description; var sys_id = gr.insert(); current.problem_id = sys_id;
Regards
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:50 AM
Hi Srinidhi,
have a before insert business rule on incident with condition as priority is p1
have below script in the business rule
var gr = new GlideRecord('problem'); gr.initialize(); // map whatever fields you want here from incident to problem gr.description = current.description; var sys_id = gr.insert(); current.problem_id = sys_id;
Regards
Manoj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 11:34 AM
Hello @srinidhi
This should be pretty simple.
There are many OOB UI actions which you can refer to, to get this functionality.
One such UI action you can refer to is : Create problem - https://xxxxxx.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=2f43c471c0a8006400a07440e49924c...
If you see line 3 of this UI action it calls:
current.problem_id = prob.insert();
This is what will help you insert the value in the desired field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 11:39 AM
Thanks for the reply, checking on this.