The CreatorCon Call for Content is officially open! Get started here.

Is it possible to create an "Are you sure" pop-up box with server-side scripts?

C_dric Chen
Tera Contributor

Greetings, people.

 

I'm trying to configure an "Are you sure you want to cancel" dialog box, but I've been experiencing quite a bit of difficulties because of other business requirements:

  • This "Are you sure you want to cancel" dialog box should appear right after I click on the "Cancel" button, and there should be a "I'm sure" button and a "Never mind" button.
  • The business analyst dictated that I have to create a glideDialogWindow window, because the bare-bone JavaScript dialog box looks "unprofessional".
  • Because one of the business requirement states that "Nobody should be able to modify the 'State' field manually. It has to be done through UI actions", and because I've created an ACL to address this requirement, I absolutely have to use server-side scripts in this UI action (Otherwise, the "State" field won't be updated at all, even when it needs to be updated). However, I haven't been able to find any examples of triggering a dialog box through server-side scripts.

 

Would anyone like to suggest what approach I should take?

 

Thank you in advance!

10 REPLIES 10

Shruti
Mega Sage
Mega Sage

Hi,

Simplest way is to use confirm dialog box

Make the UI action client side and call confirm() function onclick

Shruti_0-1751020195763.png

 

function confirm() {
       var answer = confirm("Are you sure you want to cancel");
    if (answer) {
       //logic to update
    } else {
       
    }

}
 
Another way is to  to create a dialog UI page  and use Glide Dialog Window to show the dialog