- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 05:45 PM
Hello,
When the form loads in the Service Portal, the following modal message pops up. The problem we are facing is that when we click on the 'SN Community' link, it takes us to a 'Page not found' error.
Popup Message
Error
Here is the code. Could someone please help take a look? Thank you!
function onLoad() {
if (window) {
var glideModal = new GlideModal("ui_page");
var URL = 'https://www.servicenow.com/community/';
glideModal.setTitle("Note");
glideModal.setBackdropStatic(true);
glideModal.render();
} else {
spModal.open({
title: 'NOTE',
message: getMessage('Test Popup') + '<br /> <br /><a href="' + URL + '" target="_blank">' + getMessage('SN Community'),
buttons: [
{label:'✔ ' + getMessage('Close'), cancel: true}
]
});
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 06:04 PM
Please discard this thread, as I have figured out what I did wrong.
The URL variable is defined inside the if (window) block, making it inaccessible outside that block.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 06:04 PM
Please discard this thread, as I have figured out what I did wrong.
The URL variable is defined inside the if (window) block, making it inaccessible outside that block.
Thank you