Dialog box issue

SG23
Tera Expert

Hi Guys, I have an ask to show dialog box (as below, where if the checkbox inside is selected the buttons submit/cancel to be selected again before record is saved) when a 'location' record is created/updated. Please guide with any example. ThanksTest.png

6 REPLIES 6

GlideFather
Tera Patron

Hi @SG23 

 

you can create a client script (onSubmit), something like this:

function onSubmit() {
   
var prompt = confirm('Are you sure?'); //text can be modified
if (prompt) {
return true; //allows to continue
} 

}

 

Then apply it on the corresponding table (cmn_location).

 

Let me know if it works for you

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@SG23 just tested and it works like a charm:

GlideFather_2-1754838817294.png

 

 

GlideFather_1-1754838729059.png

 

_______________

EDIT:

To change the popup title, the text and button names, refer to this:

 

Label [property] Description

Header

[headerLabel]

The modal title.
Content

[content]

Message text to display in the modal.
Primary button label

[primaryButtonLabel]

Label describing the action of the primary button in the modal footer.
Secondary button label

[secondaryButtonLabel]

Label describing the action of the secondary button in the modal footer.
Modal size

[size]

Size of the modal. The options are:
  • Small
  • Medium (default)
  • Large
  • Fullscreen
Prevent Default Primary Button Access

[preventDefaultPrimaryAction]

Prevents the default behavior of the primary (affirmative) button from closing the modal.

Default: false

Prevent Default Secondary Button Access

[preventDefaultSecondaryAction]

Prevents the default behavior of the secondary (negative) button from closing the modal.

Default: false

Defer modal content loading

[defer]

When set to false, connects the modal content when the page loads.

Default: true

 

Source:

https://developer.servicenow.com/dev.do#!/reference/next-experience/utah/now-components/confirm%20mo...

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Olá @SG23 

have you had chance looking at my response? what's the current status - solved or something still needed?

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@SG23,

have you made any progress? Some feedback would be cool 😉

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */