After Business Rule Issue incident creates a problem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:03 AM
Hi,
My requirement is to create a problem through an incident when the user changes the incident state to onHold. It is not creating any problem record at all. Kindly help.
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('problem');
gr.initialize();
gr.short_description = 'After Business Rule';
gr.description = 'After Business Rule';
gr.first_reported_by_task = '9d3c1197c611228701cd1d94bc32d76d';
gr.insert();
gs.addInfoMessage('The problem created is ' + gr.number);
action.setRedirectURL(current);
})(current, previous);
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:50 AM
@Mark Manders wrote:
What kind of process is this? An incident is set to On Hold and that creates a problem? That's very weird logic and I would first challenge this requirement before spending any more time on this.
I take back my original answer! This is worth digging into before a build!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:54 AM
It's just for practice Rob. Thank you again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:51 AM
If you built this using Flow Designer, you can test it, and the built-in preview will better tell you why its failing (assuming its still failing)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 04:53 AM - edited 12-10-2024 04:55 AM
Actually there is a out of the box business rule with unusual filters. Because of this filter, it is changing automatically to In Progress. I deactivated it and it worked.
Regards
Suman P.