- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 02:29 AM
Hi All,
I want to hide a button called 'Assign' on the portal but it should display as is on the backend view i.e is native view.
Tried the below script (on load client script) but its not working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 12:07 AM
why not make that UI action as client side and then it will only show in native and not in portal?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 02:56 AM
in your client script ensure UI Type - ALL and Isolate Script field = false
did you add alert and see in your for loop?
You can also try to use UI action condition and check in url if it's a portal page; for my example I used sp
gs.action.getGlideURI().indexOf('sp') == -1
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 10:41 PM - edited 11-21-2023 10:50 PM
Hi @Ankur Bawiskar ,
in your client script ensure UI Type - ALL and Isolate Script field = false --- yes i have already set these
Yes i have added alert, i am not getting the alert message that i have added in 'for' loop.
Before that i am getting the alert.
Can you help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 11:08 PM
so it means it's not finding the html element
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 11:26 PM
Yes.... any other ways to achieve this? or make it work?