Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Hide Hierarchy Icon In the View Page

Posted on by 225

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

Categories:
  • Suggested answer
    MehranBre Profile Picture
    MehranBre 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
    MehranBre 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
    Amrutha B K 225 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
    MehranBre 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
    Amrutha B K 225 on at
    RE: Hide Hierarchy Icon In the View Page

    not hide the hierarchy icon

  • Amrutha B K Profile Picture
    Amrutha B K 225 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
    MehranBre 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
    Amrutha B K 225 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
    MehranBre 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
    Amrutha B K 225 on at
    RE: Hide Hierarchy Icon In the View Page

    Can we hide the Hierarchy icon columns using FormContext?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans