Custom UI Acton - UI Modal is not running code after confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2023 06:09 AM
I have a made a custom UI action to convert an Incident over to a case. This works fine in the platform and workspace as long as I use a basic "confirm" prompt, but I was hoping to use a modal. My issue is that the modal closes and nothing happens. Is there something I'm missing on code with my modal? The reason this is in a UI action is because a number of our users are not using workspace.
UI action settings
UI action Script:
Workspace Client Script (this one does NOT work):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2023 02:01 PM
Either there is a bug or I do not understand where the association is being lost. But the fix is to directly call the action name rather than using g_form.submit(g_form.getActionName());. As a test I directly called my action name from the modal confirmation and it worked just fine. I went back and set the comment of the Incident to the action name that is called from g_form.getActionName() and it returned a value of "none".
Code snippet from my workspace client script.
Comment value in workspace.