web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Hide Hierarchy Icon In the View Page

(0) ShareShare
ReportReport
Posted on by 233

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/.../

I have the same question (0)
  • MehranBre Profile Picture
    732 on at

    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.

  • Amrutha B K Profile Picture
    233 on at

    Hi,

    Need to hide on the particular View, Any suggestions?

  • Verified answer
    MehranBre Profile Picture
    732 on at

    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";
    }

  • Amrutha B K Profile Picture
    233 on at

    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".

  • MehranBre Profile Picture
    732 on at

    yes exactly.

    Regards

  • Amrutha B K Profile Picture
    233 on at

    i removed js and added on click of button, getting HTML collection i.e, length as 0

  • Suggested answer
    MehranBre Profile Picture
    732 on at

    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

  • Amrutha B K Profile Picture
    233 on at

    I added in enable Rule and checked first it was not working, for debugging purpose i added onclick their length is 0

  • MehranBre Profile Picture
    732 on at

    please send your code and screenshots from configure page of ribbon button for more help

    regards.

  • Amrutha B K Profile Picture
    233 on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans