
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2017 03:06 AM
Hi guys,
I'm trying to create problem ticket through P1 INC generation. i want to achieve this by using business rule. Please advise how can i achieve this, response in beginning to end is much appreciated.
Thanks
Prabhat
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2017 09:18 PM
Hi Prabhat,
as deepak.ingale has already suggested with after business rule that will work perfectly.
i am just adding few points here.
if you will create problem from incident then in problem form there is a related list "Incident" when ever some Problem get created from that incident will attached there.
so here you go try with script below. i tested and it's working perfectly.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var CreateProb = new GlideRecord('problem');
CreateProb.short_description = current.short_description;
CreateProb.cmdb_ci = current.cmdb_ci;
CreateProb.impact = current.impact;
CreateProb.urgency = current.urgency;
CreateProb.priority = current.priority;
CreateProb.company = current.company;
var sysID = CreateProb.insert();
current.problem_id = sysID;
current.setWorkflow(false);
var mySysID = current.update();
gs.addInfoMessage("Problem " + CreateProb.number + " created");
})(current, previous);
I used condition in business rule "When to run" tab.
To show the message either you use "Action" tab or gs.addInformMessage() function in script. so i used both of them.
Final Result
Hope it will help you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2017 03:05 AM
Thank you everyone for your quick support, all three answers are correct but harshvardhansingh answer is perfect. it captures all the required aspects.
Thanks deepak.ingale & saisowmya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2020 03:50 AM
Can I suggest you DON'T do this? I'm in the process of having this ripped out and replaced by a data policy that makes the Problem field mandatory for P1 and P2 incidents then the state changes to Resolved. It accomplishes the same thing and offers the choice to either search for an existing problem or create a new one (Create Problem link does most of the work).
You still ensure that all P1 incidents are linked to a problem record, but you don't automatically create one that then needs binning because there's an existing one. If you've applied the Madrid problem state update you can make it as a duplicate, but it's still wasted effort compared to linking to the existing problem in the first place.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2020 03:54 AM
Hi can you please tell, how you are achieving this?
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2020 04:09 AM