Yes button not working on glide model popup
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
In my custom table, there is a check box,
when the form loads, I have configured this popup when form loads, if any user clicked the yes button, the checkbox should be make true, but its not working , how can i do that?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
57m ago
sorry but you didn't share code.
Share the code, screenshots and script etc
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
14m ago
function onLoad() {
var consultation = g_form.getValue('u_consultation');
if (consultation == 'false') {
var dialog = new GlideDialogWindow('');
dialog.setTitle("Free Consultation Offer");
var html = "<div style='padding:15px; font-size:14px;'>" +
"<p>This account has an active VAR contract. Would you like to offer a free 1-hour consultation?</p>" +
"<button class='btn btn-primary' onclick='acceptConsultation()'>Yes</button> " +
"<button class='btn btn-default' onclick='cancelConsultation()'>No</button>" +
"</div>";
dialog.setBody(html, false, false);
dialog.render();
}
}
function acceptConsultation() {
g_form.setValue('u_consultation', true);
var dlg = GlideDialogWindow.get();
if (dlg) dlg.destroy();
}
function cancelConsultation() {
var dlg = GlideDialogWindow.get();
if (dlg) dlg.destroy();
}
this is the code i have used
this is the code i have used