Hello Crm Community,
I am currently working on a ribbon button in the designer from microsoft and want to set my Ribbon button to visible when the user is working on a specific form.
I just cant figure out how to get this working in the designer, because there is only the option to use Power Fx to set visible to true or false.
I kinda tried every possible command in Power Fx and hoped that i could find a way to check if current form has a specific id or name.... But couldnt find a way to get it working.
Maybe i am missing something so i hope that you could help me out
I am not looking for a solution with the ribbon workbench in the xrm tool box hope for a explicit solution in the new designer with power fx.
Thank you guys in advance!
Hi sihoasks,
can you try adding these below PowerFX in the Visible property
1. if you want to show/hide ribbon button on the account form based on field values
If(IsBlank(Self.Selected.Item.'fieldname'),true,false)
2. if you want to show/hide ribbon button on main grid of account form (if at least one row of data is selected, button will be visible. Else, it will be invisible.)
If(CountRows(Self.Selected.AllItems) > 0,true , false)
Hope this will help you!
Thanks!
Hi Abdul thanks for your reply,
well i know that it is possible with the ribbon workbench but still hoping that someone might know if i could handle that somehow with the command bar or if there are any news if it will be possible in future.
Hi sihoasks,
As per my very little knowledge, I do not think this is possible using the modern command bar. You can do it with the ribbon workbench and JS.
formItem = formContext.ui.formSelector.getCurrentItem();
formItem.getId();
For more details: learn.microsoft.com/.../formcontext-ui-formselector
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156