workspace client script

Zafar4
Tera Contributor

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();

}

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Zafar4 

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()

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

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

@Zafar4 

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

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

sorry I posted wrong ui action, updated correct one in description