Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

having issues show/hide delete button in subgrid using ribbon workbench

Posted on by 190

I tried using display rule and enable rule to show/hide the delete button in the subgrid, but it's not working.  I am only able to do it for the add new button.  I think it has to do with the delete button not being displayed, as I have to click on the three dots to show the delete button.  Where as the add new can be seen as soon as the subgrid is in view.  Very frustrating....I want to show/hide based on a field value from the main form.

  • bp3378 Profile Picture
    bp3378 190 on at
    RE: having issues show/hide delete button in subgrid using ribbon workbench

    I found that since the delete button is only for when a subgrid record is selected, I need to use a field value in the subgrid to make the delete button hide/unhide.  I was using a field in the main form at first.  However I tried using this same (display rule) with the  field in the subgrid for the edit button, but edit button now doesn’t hide/unhide but the delete button does.  So frustrating.  Can u try that for a display or enable rule to hide/unhide  delete or edit button in subgrid using valuerule. ?  I just want to know if it’s just me.  Thanks.  

  • Suggested answer
    Eiken Profile Picture
    Eiken on at
    RE: having issues show/hide delete button in subgrid using ribbon workbench

    Hi,

    I tried using Enable rule and Commands to show/hide the delete button successfully and you can follow my steps to check.

    1.Choose the correct table. (The Sub-gride in main entity shows the Sub-entity data, so you should choose sub-entity here) 

    pastedimage1672116671673v1.png

    2.Customizse the DELETE button.

    pastedimage1672116920098v2.png

    3.Add a new ENABLE RULE 

    pastedimage1672117110789v3.png.

    4.Add the new Enable rule to the Commands of the DELETE button

    pastedimage1672120364646v4.png

    5. Publish it and view the result.

    pastedimage1672120811843v5.png

    pastedimage1672120829102v6.png

    You can edit the Javascript code in Enable rule to fulfill your need.

    If you want more details, the following link may help you.

    MS CRM Customization: Hide SubGrid '+' / New Button button based on Parent status (mahadeomatre.blogspot.com)

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans