Need to hide Ui actions OOB Closed Complete & Closed Incomplete on HR Agent Workspace.

Yarra Arun Kuma
Tera Contributor

Hi All,
I have a requirement to hide the closed Complete and Closed incomplete on agent workspace for particular HR service.
I have tried the below and it is hiding on Native Ui but not on Agent Workspace.

 

For our UI action name "Closed Complete". In order to hide both the top and bottom UI actions. We need to input the following into the corresponding UI policy "Execute if True" and "Execute if False" fields.

Execute if True: 
function onCondition() { 
$j('[data-action-name=closedComplete]').show(); 

Execute if False: 
function onCondition() { 
$j('[data-action-name=closedComplete]').hide(); 

 

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Yarra Arun Kuma 

why not add the condition in UI action condition field?

Why to use UI policy?

Your UI policy is using DOM manipulation which is not allowed in agent workspace

the buttons in agent workspace are not rendered via UI action table

those are present in UX Form Actions table (sys_ux_form_action)

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

@Ankur Bawiskar ,
Thank for the information, just thought of asking is there any possible way to hide the Ui Action apart from UI Action Conditions.
I hope there is no other way to hide Ui Action apart from adding conditions 

@Yarra Arun Kuma 

I already shared the logic above

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