Using Fetch XML Based Filter Criteria to Show/Hide Action Buttons in a Dynamics 365 Online Portal

Sometimes we do get a requirement to show/hide action buttons in Entity Form/Web Form/ Sub-grid based on some conditions. For example, Client may ask us to Show/Hide ‘Edit Order’ button in the Portal only if the Order Status is ‘Draft’. We can achieve this in two ways. 1) Using Javascript Code in Custom Javascript Section: …