GlideDialogWindow in service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2016 10:27 PM
Hello Experts,
How to use the the GlideDialogWindow in service portal?
I want to show some message to the user based on the variable selection.
setTimeout(function(){
var gdw = new GlideDialogWindow('response_message_und_comp_org');
gdw.setTitle('Overview of the Compliance Program');
gdw.setSize(750,500);
gdw.setPreference('message_text', 'asn');
gdw.render();
}, 1000);
response_message_und_comp_orgis a UI page.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<style>
/* dialog styles */
table#window.response_message_transload {
background-color: #ffffff !important;
}
TBODY {
background-color: white !important;
}
#popup_close_image {
display: none;
}
#ok_button {
margin-left: 25%;
}
#image_dialog {
background-color: white !important;
padding: 5px;
}
td.dialog_content {
background-color: white;
}
td.label {
text-align: left;
}
.dialog_content {
width: 100%;
height: 100px;
vertical-align: middle;
min-width: 300px;
color: black;
padding: 10px;
}
.dialog_buttons {
background-color: white !important;
margin: auto;
display: inline;
vertical-align: middle;
white-space: nowrap;
margin-left: 70px;
width: 50%;
}
</style>
<g:ui_form onsubmit="return invokePromptCallBack();">
<g:evaluate var="jvar_message_text" expression="RP.getWindowProperties().get('message_text')" />
<g2:evaluate>
var title = "${RP.getWindowProperties().get('title')}";
title = new GlideStringUtil().unEscapeHTML(title);
var warning = "${RP.getWindowProperties().get('warning')}";
warning = new GlideStringUtil().unEscapeHTML(warning);
</g2:evaluate>
<table border="0" width="100%">
<tr>
<td nowrap="true" style="vertical-align:top;">
<j2:switch on="$[warning]">
<j2:case value="true">
<img id="image_dialog" src="images/dialog_warn.pngx" width="110"
height="130" />
</j2:case>
<j2:default>
<img id="image_dialog" src="images/dialog_confirm.gifx" width="110"
height="130" />
</j2:default>
</j2:switch>
</td>
<td>
<table border="0" width="100%">
<tr>
<td class="dialog_content">
<p />
<p />
</a> Compliance documentation can be found by following this path: Business Operations >>Compliance >>Vendor Compliance
<p />
<p />
</td>
</tr>
<tr>
<td class="dialog_buttons" align="center">
<g:dialog_button_ok ok="invokePromptCallBack();" ok_type="button" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</g:ui_form>
</j:jelly>
How can make it working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2016 11:42 PM
So, It seems that Servicenow is deprecating GlideDialogWindow based on what it says here;
>GlideModalV3
>Provides methods for displaying a content overlay.
>
>This is a fully-featured replacement for GlideWindow and GlideDialogWindow.
So just look at the client side ui actions in your instance, you'll see how they've modified them to use GlideModal or GlideDialogWindow depending on whatever is available.
GlideModalV3
Provides methods for displaying a content overlay.
This is a fully-featured replacement for GlideWindow and GlideDialogWindow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 02:12 AM
Hello Jace,
Thank you very much for the information.
Its not working as well.
Thanks
Saranya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016 02:46 AM
Is it work for Service portal?
I used it in the catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 01:45 PM
Hi Saranya,
I was researching this issue and came across this discussion. It seems this doesn't work in Service Portal for Helsinki Patch 1, which is what we are currently running. The call works via 'Try It' in the Record Producer but not in Service Portal as the following JS error is thrown:
(g_env) [SCRIPT:EXEC] Error while running Client Script "Show Hartford Message": ReferenceError: GlideModal is not defined 1 js_includes_sp.jsx:64050:1
_logError https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:64050:1
_executeClientScript https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:64010:1
_wrapExecuteClientScript/< https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:63992:8
_onChangeForm/< https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:63960:1
_onChangeForm https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:63959:1
_fireValueChange/< https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:62872:1
_fireValueChange https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:62871:1
_setValue https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:62811:1
GlideForm/this.setValue https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:62392:1
controller/$scope.fieldValue https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:66558:1
blurHandler https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:66613:1
dispatch https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:2897:10
add/elemData.handle https://turnersbx.service-now.com/scripts/js_includes_sp.jsx:2689:1
Appreciate if you are able to confirm this is a known issue in Patch 1 and if it is resolved in a later Patch or Istanbul Release.
Thanks,
Joe