Dynamics 365 – CRM Portals Entity Form Action Button Filter Criteria

I recently had a user requirement which required functionality that wouldn’t be possible using the CRM Portals built in ‘Case Reopen’ button which led me to recreating the functionality using a custom Workflow Action Button. Although that worked functionally it did have a problem.

I needed to filter the buttons visibility based on fields within the case record.

There is the ability to filter button visibility in Portals but there is no official documentation regarding the feature, which is called “Filter Criteria”.

In the article below I will cover how this actually works and how you can use it yourself.

Filter Criteria

As an example, I’ll show you how to only display a button if it’s displaying on a currently resolved Case. Although this can also be applied to any record you have set up in the CRM Portal, and can even be as specific as ‘If case title equals “test”‘ if you really wanted.

  1. First thing is to create your Fetch XML which is what the field uses. The easiest way to do this is to open Advanced Find and create the query you want to use. As shown below.filterCriteria1
  2. Once you’re happy with the query and it’s returning the expected records, the next step is to click the ‘Download Fetch XML’ button in the ribbon.filterCriteria2
  3. Open the downloaded file in any text editor. You should see something similar to the image below.filterCriteria3
  4. Remove all of the attribute tags and the order tag which will leave you with just the Fetch XML that you need.
  5. Copy all of the remaining text and paste it into the ‘Filter Criteria’ field on the Action Button and then save. It should display similar to the image below.filterCriteria4
    • Note: There is a bug that will require you to click on the numbers to select a row, the text on the right isn’t actually clickable.
  6. If you’ve followed this process correctly then the button will only display when the case is resolved.


Hope this helps, and any issues get in touch below


3 thoughts on “Dynamics 365 – CRM Portals Entity Form Action Button Filter Criteria

  1. Hi,
    Nice article. Do you have an example for hiding the “Create” action button on a subgrid in an entity form ?
    I have Account Entity form (Edit mode) on which I also have a related entity , Interviews, subgrid. I would like to show or hide the Create button on subgrid based on a condition in Account. I have tried using the fetch xml but its not working.

    Please let me know, how this can be achieved ?



    1. Hey Nandan,
      I’m not sure off the top of my head exactly how you could do this using the built-in configuration options (I suspect it’s not possible). What you should be able to do though is make use of custom JavaScript on the page to hide the create option depending on a value in the Account.

      Although not 100% accurate the old ADX Studio help page on this is rather helpful – https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-form/attributes-and-relationships/custom-javascript/

      If I can help any further feel free to reply with some more details and I’ll see what I can do.



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

This site uses Akismet to reduce spam. Learn how your comment data is processed.