How to show the confirmation box of delete record message on workspace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:34 AM
Hello Experts,
How to show the confirmation box of delete record message on workspace. I created UI action , but not able to find the solution of confirmation box .How can archive this .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 02:23 AM - edited 10-17-2023 02:31 AM
Hi @Rajveer ,
For workspace Ui action look like in below screenshot make sure where exactly you are writing script.
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) {
current.deleteRecord();
}
}
});
Please mark it solution proposed and helpful if it works for you.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 03:42 AM
I tried same thing eariler ,it's not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:14 AM
Hi @Rajveer ,
Try below code if not working try to debug when onclick its showing confirm or not putting alerts.
function onClick (g_form){
if ( !confirm('Are you sure want to confirm?') )
return;
g_form.submit( g_form.getActionName() );
}
Thanks,
Anand