UI Action not working in agent workspace for dialog window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 04:50 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2022 02:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2022 07:45 AM
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
Something like this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader