Skip to main content

Notifications

Dynamics 365 general forum

Sub Grid Add new button

Posted on by 385

Hi,

I have removed a "Add" button from a subgrid on my opportunity page using this article:

https://www.marksgroup.net/blog/hide-subgrid-buttons-using-ribbon-workbench/

Works great.

Problem is I have this subgrid on another form as well where I do want to allow the add button.

How do I specify?

Thanks,

Terry

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    I don't have a "yes" on my own post which shows the solution.

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Sub Grid Add new button

    Hi Mattw,

    I am glad that your problem has been solved.   :)

    Please select the verified answer and click on its Yes to close this theme.

    This will help other users with the same problem.

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    See my previous post, I got it working.  Thanks for the information though.  The screen capture I posted was the combination of settings that worked for me.

    Terry

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Sub Grid Add new button

    Hi Mattw,

    What are your needs? Which entity's subgrid do you want to hide from which entity's form?

    If you want to hide the subgrid of the New_request on the opportunity form, then you need to add New_request entity to the solution and then set the entity of the FormEntityContextRule to opportunity. Like this:

    23178.2.PNG

    If you want to hide the add button of the subgrids on the multiple entities forms, use OrRule to add multiple FormEntityContextRules.

    23178.2.PNG

    Please note that Default and InvertResult are generally not selected.

    Also, the most important thing is that you need to customize all the buttons for adding records to the subgrid, including ADD NEW and ADD EXISTING. They all have to set Display Rules.

  • Verified answer
    Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    Finally got it working with an or rule.. not like anything I found on the internet or forums.

    Annotation-2019_2D00_06_2D00_07-161040.png

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    Tried this:

    www.youtube.com/watch

    And was able to get rid of the add button but on every subgrid not just the one on opportunities...

    Terry

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    I just tried using enable rules too didn't work.  And I also tried doing it to the 1 Add new and the 2 add existings, didn't work.

    One question.

    So when I created the base solution I included both entities opportunity and new_request.

    New_request is the subgrid and opportunity is one form I have new_request in.

    Then I select the new_request entity in the Ribbon Workbench and then select the buttons on the middle ribbon that says sub grid.

    All that sound right?

    Thanks,

    Terry

  • Mattw112b Profile Picture
    Mattw112b 385 on at
    RE: Sub Grid Add new button

    I have unhidden the buttons and published.

    Then I went back into the solution and right clicked on the buttons (There are two for the sub-grid is my understanding "ADD NEW{0}" and "ADD EXISTING {0}" - the first one on the ribbon.) and selected customize command.

    Then clicked on the command(s) and on the right under display rules I clicked "Add display rule".

    I created a new FormEntityContextRule display rule:

    • Default: FALSE
    • INVERT: TRUE
    • ENTITYNAME: Opportunity (I don't want the button to appear on the sub-grid when it is in the opportunity form, just everywhere else)

    Annotation-2019_2D00_06_2D00_07-121420.png

    Published.

    Went out to Opportunity form and the subgrid still shows the Add button.  If I got to another form with the same subgrid it also shows the add button.

    Any ideas?

    Thanks,

    Terry

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Sub Grid Add new button

    Hi Mattw,

    If you hide a button for an entity, this button will not appear in the any form of the entity.

    So if you want this button to be hidden from some forms while others still appear, I recommend using Display Rules or Enabled Rules from the Ribbon Workbench.

    Please refer to the following blogs about Display Rules:

    https://www.youtube.com/embed/wUiqaR9TruU

    https://community.dynamics.com/crm/b/crmpowerobjects/archive/2018/02/02/using-the-ribbon-workbench-in-crm-2016

    http://blog.clickdimensions.com/hide-the-send-button-based-on-privileges/

    http://purelycrm.com/newsroom/2016/12/2/how-to-hidedisplay-a-delete-button-in-command-bar-based-on-a-field-value-on-another-entity

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans