Client script not working in CSM Workspace

servicenow lath
Tera Contributor

I have Created a Client script that Shows the Dialog box popup. 

it is working in Native UI of case record . but it is not working in csm workspace.

i need this to work in csm workspace.

 

i have kept UI type to all

and also view as workspace

 

var dialog = new GlideDialogWindow("open"); //
dialog.setTitle("To Create Contact"); //Set the dialog title
dialog.setPreference('id', '12'); //
//dialog.setPreference('id', 'ABC');
dialog.render(); //Open the dialog

 

 

d5.jpg

9 REPLIES 9

Hello,

 

Go to the UI page open_google and get the endpoint of it as below:-

 

Saurav11_0-1668182000393.png

 

And use the below script and replace the endpoint with your endpoint

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }

     var url = "/sn_major_inc_mgmt_mim_workbench_promote.do?sysparm_stack=no&sysparm_workspace=" + true;
		g_modal.showFrame({
			title: getMessage("To Create Contact"),
			url: url,
			size: 'lg',
			autoCloseOn: 'URL_CHANGED',
				});
   
}

 

Please mark my answer as correct based on Impact.

I am Getting an Error like this how to solve this

 

 

 

 

 

Hello,

 

What is the error over here I can see that the message displaying is the one that is written in the UI page in the else part.

 

Thanks.

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @servicenow lath 

Here is the alternative for GlideModel :-

Creating and Using Modal Components in Agent Workspace 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

JW154
Tera Contributor

Hi, Im facing the same issue. Any solution?