Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Associated view

Posted on by 130

Hi All,

I have 2 subgrid of leads on account form. One subgrid is OOB other is custom i.e it takes data from fetchxmldefined in JS. 

I want to hide the associated view button for custom subgrid...Can anyone help me on this .

I cann't do it by ribbon workbench i think as it will hide for all subgrids that i have on account form

*This post is locked for comments

  • Verified answer
    Kapil Singla Profile Picture
    Kapil Singla 130 on at
    RE: Associated view

    Hi,

    I am sorry but rn m at home but we have used the steps as mentioned in below link

    The only diff is we have used lead as subgrid

    blog.navantis.com/dynamically-change-sub-grid-fetchxml-with-a-small-twist-fix

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Associated view

    Can you please share screen shot and xml?

  • Kapil Singla Profile Picture
    Kapil Singla 130 on at
    RE: Associated view

    We have used fetchxml for that subgrid data. It's not oob but custom subgrid

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Associated view

    Change properties of sub grid and select only one view that you want to show.

  • Kapil Singla Profile Picture
    Kapil Singla 130 on at
    RE: Associated view

    I have two lead sub grids on account form.. I want to hide associated button for only one subgrid of lead on account form

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Associated view

    Hi Kapil,

    Why you are thinking so , check here this is similar like hiding subgrid + button. You need to check just entity type in the enable rule.

    community.dynamics.com/.../275058

    function HideAssociatedViewButton() {

       var entityType = Xrm.Page.data.entity.getEntityName();

       if (entityType == "contact") {

           return false;

       }

       else {

           return true;

       }

    }

  • Kapil Singla Profile Picture
    Kapil Singla 130 on at
    RE: Associated view

    Hi Goutam,

    Won't it disable that button for all different entity  subgrid's on that parent entity ?

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Associated view

    Hi Kapil ,

    Try to write enable rule based on parent entity type return false otherwise always true.

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans