After Business Rule Issue incident creates a problem

Community Alums
Not applicable

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.

 

1.png

 

2.png

 

(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.

9 REPLIES 9


@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!

Community Alums
Not applicable

It's just for practice Rob. Thank you again.

Community Alums
Not applicable

Hi @Anurag Tripathi,@PrashantLearnIT 

 

3.png

 

Regards

Suman P.

Uncle Rob
Kilo Patron

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)

Community Alums
Not applicable

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.

 

5.png

 

Regards

Suman P.