Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

how to call a modal window widget in catalog client script?

sagarikamodiam
Tera Contributor

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?

9 REPLIES 9

Mike Patel
Tera Sage

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}
			],
		});
	}
}

Thanks for the reply Mike. I have tried the above code but it is not working for me

Are you using Portal if so than which widget and page ?

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!