Query CRM Data in a dialog

If your dialog depends on the ability to display some data that is retrieved from CRM you should add a Query CRM Data step before you need to view this data as either of the Option Set response types.

When you define a query you are shown a screen based on the Advanced Find page. You can define a new query or use one of the existing views. When any of the queries requires setting a specific value, that value is considered a variable.

For example, you can create a query that shows all the Case records where a specific Account is the Customer. For the query to work, you must specify an Account Record to be the placeholder. Then, when you select the Modify Query variables tab you will see the FetchXML representation of the query with a variable generated where you had specified a specific Account in your query. You need to use the Form Assistant to set a slug to represent the Account record that is the context of a Dialog defined for the account entity

Query variable

After you have done this you can Save and Close the Query. If you click the Design New tab at this point, your dynamic value set for this query will be removed and you will need to add it back again.

You can have a query with variables and not use a dynamic value, but then the results shown will be the same with every dialog.

Disclaimer: this text is part of the “Administering CRM 2015 for online and on-premises”-Guide, I have not written this myself and do not claim any ownership of it. Moreover this document is provided “as-is”.

Leave a Reply

Your email address will not be published. Required fields are marked *

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