Incident to RITM creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 11:12 AM - edited ‎08-20-2024 11:14 AM
I have a form context option UI action the incident form that will cancel the Incident and create a request. It works but I have a Modal pop up that gives the option to cancel the Incident or perform no action which would do nothing to the incident and still create the request. Right now the incident cancels regardless of what option I choose and if I try to add in a condition based on the modal, the whole thing breaks.
the current code is attached, I want to add in a condition such as:
var cancelIncident = confirm("Do you want to cancel the incident?");
var actionDisplayValue = g_form.getDisplayValue('u_action');
if (cancelIncident && actionDisplayValue === 'Cancel')
But it does not work because the actionDisplayValue is on a modal and not the actual form (the modal code is at the top of the image) any suggestions on how I can access the values in the modal so I can create a condition that says if The modal dropdown option is "cancel" then cancel the Incident