workspace client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2023 11:28 PM - edited ‎05-05-2023 12:05 AM
we have a ui action "Add approver" which will give option to select 1 user from user table and add that user as approver for HRSD record in "sysapproval_approver" table. But this is not working in agent workspace script. Any one please let me know how this can be changed to work in agent workspace for HRSD. Attached UI page
function launchApproverDialog() {
var gdw = new GlideDialogWindow("sn_hr_core_hr_add_approver");
gdw.setTitle(getMessage("Add Approver"));
gdw.setPreference("sysparm_case_id", g_form.getUniqueValue());
gdw.setPreference('sysparm_table_name', g_form.getTableName());
gdw.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2023 11:43 PM
So on click of that button you are taking some input and that input has to be populated in some field on form?
If yes then there are many OOB UI actions which does similar
try to check any one of those and replicate for your case
You can show multiple inputs inside the workspace client script using g_modal
You can also open the UI page using g_modal.showFrame()
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2023 11:46 PM
we have only HRSD module enabled and none of other modules are active in our instance. So can't find any other OOB ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2023 11:48 PM
I could see many OOB UI actions have workspace client script in them
When you click on that UI action in native how does it look and what are you doing exactly with the input?
please share some thoughts on it
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 12:06 AM
sorry I posted wrong ui action, updated correct one in description