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.
- Create a dialog that runs from the account entity
- 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.
- 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 .