
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 04:13 AM
Hi,
I would like to know if anyone know the step by step procedure on how I can create a login popup message from scratch?
I wanted the users to agree to our "Terms and Conditions" upon logging in the instance and store their responses in ServiceNow.
I found some articles from SNGuru although it requires downloading a dialog which is no longer available.
Thank you in advance for the feedback!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:29 AM
You can save the result either in a table or for example as a user preference. I modified the ServiceNow Guru script below:
function termsOK() {
//Gets called if the 'OK' dialog button is clicked
//Make sure terms have been accepted
var terms = gel('accept_terms').value;
if (terms != 'true') {
//If terms are false stop submission
alert('Please accept the terms and conditions to continue your order.');
return false;
}
//If accept checkbox is true do this...
GlideDialogWindow.get().destroy(); //Close the dialog window
if (!getPreference("user_accepted")) {
setPreference("user_accepted", "true")
}
}
function termsCancel() {
//Redirect gets called if the 'Cancel' dialog button is clicked
if ($('cancel_url').value != 'null') {
window.location = $('cancel_url').value;
}
else {
window.location = 'home.do'; //Redirect to default homepage
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 04:17 AM
Hi there,
Earlier this week there was a similar topic on this. See:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:35 AM
Thanks Mark! We were still working on a solution. Not sure why it is marked correct already.
But I think it is working now. If you have time, can you see if you have any input on it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:21 AM
Yes, we were working on it. I think I have it working now and wrote an article about it. If you have any additions, feel free to add:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 06:27 PM
Hi
Thank you for information! May I know where in the scripts should I put the table to store their responses?