Tip #27: Conditional action in dialog based on record counts

One of the more powerful things that can be done with a dialog is querying data. You can query data in CRM to populate a picklist, and my favorite use of it is to query data and then base a conditional action on the record count.

Consider this scenario: You sell to businesses, you have a dialog to create an opportunity, and you want it to act differently for existing customers than for new customers.

  1. Create a dialog that runs from the account entity
  2. Add a query CRM step and build a fetch to query sales orders for the selected account. See this post for detailed instructions on how the query step works.
  3. Add a check condition step. Select the name of your query step and select “records” and “less than one.”

This gives us the ability to dynamically query CRM data and conditionally do something .

Share on FacebookTweet about this on TwitterShare on Google+

Leave a Reply

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