The CreatorCon Call for Content is officially open! Get started here.

How to get the Preview Document UI action to work on Workspaces

davilu
Mega Sage

Our team is trying to get the OOTB UI Action called Preview Document to also work on Workspaces.  We've cloned the UI Action and in the Workspace tab, checked the "Workspace Form Button" checkbox and in the "Workspace Client Script", we've copied down the code from the OOTB "Script".  We've read that GlideModal or GlideDialogWindow doesn't work and we should look into g_modal, so we are trying something like this:

 

var ui_page_id = 'c6bbfec6c78300107da20b3703c26024';
			g_modal.showFrame({
				url: '/ui_page.do?sys_id=' + ui_page_id, //url,
				title: 'Test',
				size: 'lg',
				height: 500
			});

 The button still doesn't work and when we look in our browser console, we see that there's an error that says "Unhandled exception in GlideAjax".  Any suggestions on what we need to do to convert this UI Action so it works in Workspace?

 

Thanks!

0 REPLIES 0