How to show the confirmation box of delete record  message on workspace.

Rajveer
Tera Expert

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 .

 

Rajveer_0-1697531635745.png

 

 

3 REPLIES 3

Anand Kumar P
Giga Patron
Giga Patron

Hi @Rajveer ,
For workspace Ui action look like in below screenshot make sure where exactly you are writing script.

AnandKumarP_0-1697535027676.png

 

 

 

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

I tried same thing eariler ,it's not working.

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