Hide UI Action on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 02:12 AM
Hi!
So, I am having this situation where I want to hide the OOTB UI Action buttons from a form that belongs to the Global Scope, but I want this to happen on the scoped application.
When I have done ' hide('button_name'); ', it somehow just deactivated it for all forms on my instance.
Sure enough I reactivated it manually, but what if this happens on a future client's instance?
Also, this works, but only at the top of the form, the bottom remains visible.
Any ideas why?
Thanks,
Darius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 03:36 AM
I'm afraid I cannot do this in the current setup I have, because I am developing my application with its own scoped name, the UI Action in question (submit) is on the Global.
Although I'm not certain what you suggest me to add this for, are you suggesting to do this on the Global scope? Because if so, the configuration won't be saved on the app.
Thanks,
Darius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 02:30 AM
are you not hiding it based on UI action condition?
how are you currently achieving this?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 03:26 AM
Well, if I change the condition on the button, it will affect other forms as well as it is the OOTB, so from this point of view, I don't want to put a condition on the UI Action.
So, worst case scenario, I could do this on UI Action condition, that is fine. But I am developing my own application with its own scope, and the button is on global. So, either ways I can't edit it from my own scope as the button is on Global. I ended up making this from client script.
Interestingly enough, this works just fine now. But my worry is that I don't understand WHY it deactivated it when I first entered this code? All I had was hide('button_name'); and it was gone (which is what I wanted) on my form. But soon I realised that it was gone on pretty much every other form too (incidents, change, etc). So having investigated the issue, I realised that it was deactivated. That's why I am asking the question! Why could it be deactivated? What could have triggered this, especially since I'm giving directives from a scoped application.
So naturally I cannot do anything else but worry about anyone else having the application and experiencing the same issue.
Thanks,
Darius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 04:40 AM
then use onLoad client script on your table and hide the UI actions using DOM manipulation
Remember DOM manipulation is not recommended.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 02:10 AM
To which extent this is acceptable?
I mean when should I avoid this at all cost?