Show/Hide Buttons Based on Entity Permissions Using Power FX


A client wanted to show a button to users with specific permissions in Dynamics 365. Instead of using the Ribbon Workbench and JavaScript, they found a simpler solution using Power Fx formulas. The formula they used is DataSourceInfo({EntityName},DataSourceInfo.{Permission}), which checks the table (entity) permission. They created a new button using the Command Bar Editor and set the visibility to "Show on Condition from Formula." They added the formula to show the button only if the user has the specified permission. They also mentioned another method called RecordInfo, which checks permissions for a specific record within an entity. Using Power Fx formulas simplifies the process compared to the traditional approach.


Article 6m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time