[#PowerTip] Hide/Show button for non-admin users using Power Fx

In my previous post, I have articulate how we can use Ribbon workbench to add display rules to show/hide buttons. Introduction of new command designer using Power Fx is also a tool we can use to update the enable or visible rules. Limitation with command designer is that it won’t support legacy button to customize. Sadly we will get this below message on those buttons.

If you are working on a custom entity or introducing a custom button on a standard entity then using command editor the Visibility can be set. Select  Show on condition from formula. Use the DataSourceInfo command to verify data source i.e. table access as below. The data source can be any table that is part of the model-driven app.

DataSourceInfo(Accounts, DataSourceInfo.DeletePermission)
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s