- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 07:29 AM
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
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 07:50 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 07:50 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 04:07 PM
Thats it, thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 02:40 AM
You`re welcome 🙂