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

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

w

Connecting to %s