Hide UI Action on Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 07:11 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 08:23 PM
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-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 10:22 PM
HI @Xion ,
I trust you are doing great.
- Log in to your ServiceNow instance with the appropriate credentials.
- Navigate to the 'UI Actions' module by searching for 'UI Actions' in the navigation pane.
- Search for the 'Save' UI Action in the list of UI Actions and open it.
- 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);
}
Save the changes to the 'Save' UI Action.
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