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

  • Suggested answer
    MehranBre Profile Picture
    730 on at
    RE: Hide Hierarchy Icon In the View Page

    hi Amrutha,

    Was the problem solved with this code?

    Best Regards.

  • Suggested answer
    MehranBre Profile Picture
    730 on at
    RE: Hide Hierarchy Icon In the View Page

    hi,

    In which line do you get error?

    and please submit this question in another post. i see this ;)

    Regards

  • Amrutha B K Profile Picture
    233 on at
    RE: Hide Hierarchy Icon In the View Page

    Hi Mehran,

    I added this code for filtering the lookup field not working properly.any suggestion

    function addEventHandlerIPA() {

       Xrm.Page.getControl("ghi_contact").addPreSearch(addAccountFiltersIPA);

    }

    function addAccountFiltersIPA() {

       var acclookup = Xrm.Page.getAttribute("regardingobjectid");

       if (acclookup != null) {

           lookUpObjectValue = acclookup.getValue();

           if ((lookUpObjectValue != null)) {

               var selectedAccount = lookUpObjectValue[0].id.slice(1, -1);

           }

       }

       if (selectedAccount != null) {

           var fetchXmlIPA = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +

               "<entity name='contact'>" +

               "<attribute name='fullname' />" +

               "<attribute name='telephone1' />" +

               "<attribute name='contactid' />" +

               "<attribute name='parentcustomerid' />" +

               "<order attribute='fullname' descending='false' />" +

               "<filter type='and'>" +

               "<condition attribute='statecode' operator='eq' value='0' />" +

               "<condition attribute='parentcustomerid' operator='not-null' />" +

               "</filter>" +

               "<link-entity name='account' from='accountid' to='parentcustomerid' link-type='inner' alias='ab'>" +

               "<attribute name='ghi_internationalparentaccount' />" +

               "<filter type='and'>" +

               "<condition attribute='ghi_internationalparentaccount' operator='eq' uiname='United Lincolnshire Hospitals NHS Trust' uitype='account' value='" + selectedAccount + "' />" +

               "</filter>" +

               "</link-entity>" +

               "</entity>" +

               "</fetch>";

           Xrm.Page.getControl("ghi_contact").addCustomFilter(fetchXmlIPA, "contact");

       }

    }

  • Suggested answer
    MehranBre Profile Picture
    730 on at
    RE: Hide Hierarchy Icon In the View Page

    hi,

    I left this code for you so that you can find the relevant tag yourself and then delete it, so try harder ;)

    Regards.

  • Amrutha B K Profile Picture
    233 on at
    RE: Hide Hierarchy Icon In the View Page

    not hide the hierarchy icon

  • Amrutha B K Profile Picture
    233 on at
    RE: Hide Hierarchy Icon In the View Page

    I added the code it will work on the particular column, it will hide all the data inside the column

  • Suggested answer
    MehranBre Profile Picture
    730 on at
    RE: Hide Hierarchy Icon In the View Page

    hi,

    submit this js function on a field of view. RowId not changed until now.

    function onLoadRow(rowData, userLCID) {

       var str = JSON.parse(rowData);

       $('[oid="' + str.RowId + '"]').find("img").remove();

    }

    Best Regards.

  • Amrutha B K Profile Picture
    233 on at
    RE: Hide Hierarchy Icon In the View Page

    No scroll didnt work, my senior told when we use class name it is unsupported

    if future if the class name change .

  • Suggested answer
    MehranBre Profile Picture
    730 on at
    RE: Hide Hierarchy Icon In the View Page

    hi,

    No, this does not exist in FormContext and we do not have FormContext on the view.

    Did not solve the problem with OnScroll?

    Regards.

  • Amrutha B K Profile Picture
    233 on at
    RE: Hide Hierarchy Icon In the View Page

    Can we hide the Hierarchy icon columns using FormContext?

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Product updates

Dynamics 365 release plans