Hide UI actions in Agent Workspace - Using Scripting

Balaji Munusamy
Tera Contributor

Hi @Ankur Bawiskar 

My requirement is

Writing a script on hiding UI action in Agent Workspace.
 
For Agent Workspace case table - hide the following UI actions:
1. Create Work Order
2. Create Standard Change
 
Please include in the notes how you disabled these UI actions.
 
Hint: UI actions condition code is run server side. 
The "condition" field of a UI action is always evaluated on the server-side -- even if the UI action is configured as client-side, that only affects the main script, not the condition. Whatever you're currently doing in the field is already a server-side script.

Since the condition field is server-side, you can always run code from Script Includes there. Please see the quick-start guide here  to learn more about creating and using Script Includes.

In your case, you should be able to simply create what they call an On Demand Script Include .

can you please help on this?

1 ACCEPTED SOLUTION

Hemant Kumar Ch
Kilo Sage

Hello Balaji 

To hide UI actions in the Agent Workspace in ServiceNow, you can use the following steps:

  1. Navigate to the UI Action form for the UI action you want to hide. You can find this by searching for "UI Actions" in the Filter Navigator and clicking on the name of the UI action you want to edit.

  2. In the form, click on the "Advanced" tab.

  3. Under the "Advanced" tab, find the "Condition" field and enter a condition that constantly evaluates to false. For example, you can use "1=2".

  4. Save the UI action.

After following these steps, the UI action should no longer be visible to agents in the Agent Workspace.

Note: If you want to completely remove the UI action from the Agent Workspace, you will need to also remove it from the relevant view, list, 

View solution in original post

7 REPLIES 7

Hemant Kumar Ch
Kilo Sage

Hello Balaji 

To hide UI actions in the Agent Workspace in ServiceNow, you can use the following steps:

  1. Navigate to the UI Action form for the UI action you want to hide. You can find this by searching for "UI Actions" in the Filter Navigator and clicking on the name of the UI action you want to edit.

  2. In the form, click on the "Advanced" tab.

  3. Under the "Advanced" tab, find the "Condition" field and enter a condition that constantly evaluates to false. For example, you can use "1=2".

  4. Save the UI action.

After following these steps, the UI action should no longer be visible to agents in the Agent Workspace.

Note: If you want to completely remove the UI action from the Agent Workspace, you will need to also remove it from the relevant view, list, 

Balaji Munusamy
Tera Contributor

Thanks @Hemant Kumar Ch .

Is this possible to accomplish using scripting?

Ankur Bawiskar
Tera Patron
Tera Patron

@Balaji Munusamy 

why not use UI action condition field to show/hide

what did you try so far and what's not working?

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

Balaji Munusamy
Tera Contributor

Hi @Ankur Bawiskar 

 When I Navigate to the UI Action form for the UI action , I am not able to see UI actions that I want to edit.