Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 04:29 AM - edited 10-22-2024 04:29 AM
Hi @Roshini
UI Action Client checkbox should be true and onClick use openPopup() method.
I did similar requirement long back, Adding code below. Modify according to your requirement.
function openPopup() {
var tableName = ''; //table name here
var sysid = g_form.getUniqueValue();
//Create and open the dialog form
var dialog = new GlideDialogForm('Title', tableName); //Provide dialog title and table name
dialog.setSysID(sysid); //Pass in sys_id to edit existing record, -1 to create new record
dialog.addParm('sysparm_view', 'Reasons'); //Add view of the form
dialog.setLoadCallback(function(iframeDoc) {
// To get the iframe: document.defaultView in non-IE, document.parentWindow in IE
var dialogFrame = 'defaultView' in iframeDoc ? iframeDoc.defaultView : iframeDoc.parentWindow;
dialogFrame.g_form.setValue('u_number', g_form.getValue('u_number'));
dialogFrame.g_form.setValue('u_state', 'Completed');
dialogFrame.g_form.setMandatory('u_justification', true);
dialogFrame.g_form.setReadOnly('u_select_user', true);
dialogFrame.g_form.setReadOnly('u_hiring_manager', true);
dialogFrame = null;
});
dialog.render(); //Open the dialog
}
Refer Below article
https://servicenowguru.com/system-ui/glidedialogwindow-quickforms/
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP