The CreatorCon Call for Content is officially open! Get started here.

How to close Incident once converted to REQ

Russell Abbott
Kilo Sage

I have a UI Action on the Incident form called 'Create Reequest', clicking this opens up the Catalog, transfers details from INC to REQ and lastly Resolves the REQ with the 'Transferred to Request' resolution code.

I have a requirement to Close after the Resolve

After searching some similar threads i added this line to the UI Action

current.state='7';
current.update();

The behaviour closes the INC as soon as it loads the Catalog, but then once i have filled out and saved the Request it changes the Incident state back to 'Resolved'

I can't seem to find what is setting the state value here. I would also prefer the 'Close' to happen AFTER the Request is created and not BEFORE, to remove the possibility of an accidental click closing an Incident out.

Thank you

1 ACCEPTED SOLUTION

Martin iTSM
Tera Guru

Hi Russell,

guess an "after insert" business rule on [sc_request] should be fine?

Conditions could be something like " current.parent.sys_class_name=='incident' " - so this would only run if the inserted request has an incident referenced in the parent field. 

Within the BR you can get the INC record via "current.parent" and do with it whatever you need to.

I have built something similar a while ago and it worked just fine.

Cheers!

Martin

View solution in original post

3 REPLIES 3

Martin iTSM
Tera Guru

Hi Russell,

guess an "after insert" business rule on [sc_request] should be fine?

Conditions could be something like " current.parent.sys_class_name=='incident' " - so this would only run if the inserted request has an incident referenced in the parent field. 

Within the BR you can get the INC record via "current.parent" and do with it whatever you need to.

I have built something similar a while ago and it worked just fine.

Cheers!

Martin

Thats it, thank you very much!

You`re welcome ðŸ™‚