GlideDialogForm not showing custom view in client script

Rakesh50
Mega Sage

Hello everyone,

We are currently facing an issue with showing a pop-up using a custom view. We have a view rule on a form, and on the same form, we have a UI Action named 'canceled'. When this UI Action is clicked, it sets a saved field checkbox to true and reloads the page. We have also created an onload script that checks if the 'saved' field is true. If it is true, we are attempting to show a window with a custom view, but unfortunately, it's not working.

I came across information in the community stating that if any view rule is applied on the form, sysparm_view will not be applicable. Considering this, I'm seeking help from the community: does anyone have any idea how we can show a popup with a custom view even if a view rule is applied?

 

if(g_form.getValue('u_saved')=== 'true'){
		var tableName = g_form.getTableName();
		var number = g_form.getValue('number');
		var sysID = g_form.getUniqueValue();
		var dialog = new GlideDialogForm('Information', tableName); 
		dialog.setDialogSize(550,500);
		dialog.addParm('sysparm_view', 'custom');
		dialog.setSysID(sysID);
		dialog.removeCloseDecoration();
		dialog.render();
	}

 

0 REPLIES 0