List UI Action Confirm for Multiple Records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2020 12:37 PM
I have a UI action that can change a value for multiple records at once. If someone selects multiple records in a list and clicks that UI action, I would like a confirm window to pop up. It does not look like a can put this in the script, because the script is per record, and I want the confirm popup to appear once no matter how many records are selected. How can I accomplish this?
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2020 01:10 PM
You can put this in UI action script like below
check the 'client' checkbox in your UI action and in 'onclick' field call function like cancelTicket()
function cancelTicket(){
var answer=confirm("Are you sure you want to cancel this record?");
if (answer==true)
{
gsftSubmit(null, g_form.getFormElement(), 'cancel_change'); //MUST call the 'Action name' set in this UI Action
}
else
{
return false;
}
}
if(typeof window == 'undefined')
{
current.state = 8;
current.update();
action.setRedirectURL(current);
gs.addInfoMessage('The current change request has been cancelled.');
}
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2020 01:13 PM
Hi,
You can use:
var checkedList = g_list.getChecked();
To have the number of rows checked when you click the UI Action list choice.
Thanks,