Hide UI Action on Service Portal

Xion
Tera Expert

Hi,

 

We have a UI Action called 'Save', which is Global Ui Action, and another Custom Ui Action, ' Modify'.

We want to hide both of them on the Service portal only. It should be visible on the platform.

 

Any recommendations will help.

 

2 REPLIES 2

Community Alums
Not applicable

Hi @Xion ,

You will have to play with CSS here, please refer to this thread: https://www.servicenow.com/community/developer-forum/how-to-hide-cusomt-ui-action-in-service-portal-...

 

Amit Gujarathi
Giga Sage
Giga Sage

HI @Xion ,
I trust you are doing great.

  1. Log in to your ServiceNow instance with the appropriate credentials.
  2. Navigate to the 'UI Actions' module by searching for 'UI Actions' in the navigation pane.
  3. Search for the 'Save' UI Action in the list of UI Actions and open it.
  4. In the 'Client' script field, add the following code snippet:

 

if (typeof window.g_service_portal !== 'undefined' && window.g_service_portal) {
    // Hide the UI Action on the Service Portal
    current.setDisplay(false);
}

 

  1. Save the changes to the 'Save' UI Action.

  2. Repeat steps 3 to 5 for the 'Modify' UI Action.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi