UI action now showing on HR agent workspace

eyal abu hamad
Mega Sage

I created export to pdf button and Its not showing in the HR AGENT WORKSPACE

eyalabuhamad_1-1746428278632.png

 

eyalabuhamad_0-1746428268317.png

 

1 ACCEPTED SOLUTION

@eyal abu hamad 

this config worked for me

1) I used incident table and SOW, you can enhance it for HR Agent Workspace

2) I kept that UI action as Form Context Menu and Form button both

3) added client script in script field as well along with workspace client script

4) didn't add any views in "UI Action Visibility" related list

workspace export pdf UI action.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

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

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@eyal abu hamad 

you are using wrong script in workspace client script

it should be this, ensure you give correct workspace view name

function onClick(g_form) {

	var url = '/' + g_form.getTableName() + '.do?PDF&sys_id=' + g_form.getUniqueValue() + '&sysparm_view=workspace';
	open(url,"_blank");
	
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

still didnt work for me

eyalabuhamad_0-1746430129178.pngeyalabuhamad_1-1746430131090.png

 

eyal abu hamad
Mega Sage

@Ankur Bawiskar  still didn't work

eyalabuhamad_0-1746429872508.pngeyalabuhamad_1-1746429911257.png

 

@eyal abu hamad 

that UI action is visible in other 2 views and not in workspace and hence not visible

ensure that UI action is visible in workspace and then it will start working

If my response helped please mark it correct and close the thread so that it benefits future readers.

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