UI Action not working in agent workspace for dialog window

mr18
Tera Guru
Tera Guru

Created a UI Action on incident table to display popup for problem.

It is working in normal UI but not in Agent Workspace. Also, need to set the parent of problem to incident.

function showMyForm() {
    var sysID = g_form.getUniqueValue();

    //Create and open the dialog form
    var dialog = new GlideDialogForm('Create problem', 'problem'); //Provide dialog title and table name
    dialog.setSysID(-1); //Pass in sys_id to edit existing record, -1 to create new record
    dialog.addParm('sysparm_view', 'default'); //Specify a form view
    dialog.addParm('sysparm_form_only', 'true'); //Add or remove related lists

    dialog.setLoadCallback(function(iframeDoc) {
        // To get the iframe: document.defaultView in non-IE, document.parentWindow in IE
        var dialogFrame = 'default' in iframeDoc ? iframeDoc.default : iframeDoc.parentWindow;
        
        dialogFrame = null;
		
    });

    dialog.render(); //Open the dialog
	
}
6 REPLIES 6

mr18
Tera Guru
Tera Guru

@Ankur Bawiskar any help on this?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Agent workspace doesn't support GlideDialogWindow as it uses Jelly and workspace doesn't support jelly.

you can try to search any OOB UI action which has something similar in workspace client script

you can use g_modal to show the fields

Render a Now component in a modal

https://community.servicenow.com/community?id=community_question&sys_id=a43a35cfdbf1b810019ac2230596...

Something like this

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader