- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:05 PM
Hi,
I have a custom UI Action for workspace form. How it's supposed to work: upon pressing the UI action, it should show a pop-up confirmation window. After confirming, it should create a new case. The problem I'm facing is that when pressing the UI action, the confirmation popup appears but before I even can press confirm, the new case already gets created.
How do I make sure the new case only gets created after I press confirm?
I've followed the solution of this thread, but to no avail.
Any help would be appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 01:35 AM
Found a solution:
function onClick(g_form) {
if (!confirm(getMessage("Are you sure you want to close this interaction and open a new CC case?"))) {
return;
}
g_form.submit(g_form.getActionName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:33 PM
function onClick(g_form) {
var msg = getMessage("Are you sure you want to take this action?");
g_modal.confirm(getMessage("Confirmation"), msg, function (confirmed) {
if (confirmed) {
g_form.setValue('state', 'closed_complete');
g_form.save();
}
});
return false;
}Hi @JordyZ ,
can you try to pass in this format..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 01:35 AM
Found a solution:
function onClick(g_form) {
if (!confirm(getMessage("Are you sure you want to close this interaction and open a new CC case?"))) {
return;
}
g_form.submit(g_form.getActionName());
}