Notifications
Announcements
No record found.
Hi Experts,
I have the requirement to Hide Hierarchy Icon In the View Page Using Javascripts
Can AnyBody help me on this..
Tried the below Link to Hide the Icon
neilparkhurst.com/.../
hi,
Do you mean that you do not need it at all or you just want to hide it in this particular view?
best regards.
Hi,
Need to hide on the particular View, Any suggestions?
Hello
Okay, you can do this by adding a button to the ribbon using the ribbon workbench.
Add a button to the view of this entity, but do not define an action and icon for this button, and just define an Enable Rule of Javascript type and call the following function
It is best to place this button at the end of all the ribbon buttons. also you can get and filter view name for this.
function HideHierarchyIcons() { var x = document.getElementsByClassName("ms-crm-ImageStrip-hierarchy"); for (let el of x) el.style.display = "none"; }
Hi Mehran,
I added all the steps u mentioned,
in enable rule we need to select custom rule and then for default we need to give "True".
yes exactly.
Regards
i removed js and added on click of button, getting HTML collection i.e, length as 0
I think you did not understand what I meant.
In the Enable Rule you have to add a Custom Javascript Rule and in this section select the web resource and the function name. Only if this function is executed when the page loads!
When you click, you do not have access to the contents of the boiler page, and it is natural that nothing will be returned to you.
Please try again
Best Regards
I added in enable Rule and checked first it was not working, for debugging purpose i added onclick their length is 0
please send your code and screenshots from configure page of ribbon button for more help
regards.
function AccountHierarchyIcon() {
debugger;
var x = document.getElementsByClassName("cc-hierarchy-icon");
for (let el of x) el.style.display = "none";
}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 170 Super User 2025 Season 2
#ManoVerse 61
Gerardo RenterÃa Ga... 52 Most Valuable Professional