how to call a modal window widget in catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2018 06:36 AM
Hi Guys,
I am new to service portal. I have a widget to show a modal window. But how to call that particular widget in a catalog client script to replace GlideDialogwindow() is my question?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2018 06:45 AM
You can do something like below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var html = "Search Results.";
// Use spModal to pop the HTML
if (html) {
spModal.open({
title: 'Possible search results: ' + newValue,
message: html,
buttons: [
{label:'OK', primary: true}
],
});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2018 07:25 AM
Thanks for the reply Mike. I have tried the above code but it is not working for me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2018 07:32 AM
Are you using Portal if so than which widget and page ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 12:22 AM
Hi Mike,
I am also facing similar issue in SP.
So the above code did work for me.
But nnow the issue is, the mesage I am trying to display is long enough and it is stored in a UI Page.
Could you pelas etell me how can I call the UI page using SP Modal method.
Thanks in advance!