Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Wrestling with Ribbon Workbench and Dynamic buttons

Posted on by 5

Hello everyone,

I have been struggling with a certain problem for a few days now. I am trying to hide a button when a condition is met. This is working fine on forms using enable rules but not in the list view. I doubt it is even possible but maybe someone with more experience can explain why.

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Wrestling with Ribbon Workbench and Dynamic buttons

    Hi ,

    I understand both are doing same functionality but they are located in different places  forms and home grid. So you may have added the enable rule in the forms based on some condition and its working as  expected on the forms and not in the entity home grid. So there is no straight forward way to do that  as the button is showing in the home grid and when you click the button you need to pass the selected record id to the action. Do the steps shared in the above link shared by Ravi.

    In the enable rule JS functions you only get the id and not all the value to fulfill your condition so you need to write some API request to get the data and implement your condition and return true , false so that button will be show/hide based on the selected records.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Wrestling with Ribbon Workbench and Dynamic buttons

    Hi,

    I am not sure what have you added in enable rule to hide the button or write your logic to determine the value but assuming you are using javascript to get the field value. If this is tru then it won't work as on subgrid, you won't be able to get the field value using getAttribute.

    You will need to use different JS/logic to determine the field value. Something like this: ribbonworkbench.uservoice.com/.../129783-pass-the-currently-selected-grid-row-s-to-a-custo

    You might also need to use web api to get any specific field value based on the retrieved id.

    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

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,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