I have just stumbled upon a great new hidden feature that Dialogs inherited from workflows. You can look up records, and have the user select a record, then execute other workflows/dialogs against that record.
So here is an example of this. I want to create a Dialog that helps me verify that a lead should be qualified or if there are more than 1 leads with the same company name I want to choose if we want to qualify one of the other leads. If we do then the other lead will be qualified and the current lead will be lost. Otherwise, we will qualify the current lead.
A . Create a dialog called Lead-Qualify Lead
1. Under steps add query CRM data call the step “Query-All Leads with This leads Company Name”
2. Paste in the fetchXML
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="lead">
<attribute name="fullname" />
<attribute name="createdon" />
<attribute name="statuscode" />
<attribute name="subject" />
<attribute name="ownerid" />
<attribute name="leadid" />
<order attribute="createdon" descending="true" />
<filter type="and">
<condition attribute="statecode" operator="eq" value="Variable1" />
<condition attribute="companyname" operator="eq" value="Variable2" />
<condition attribute="leadid" operator="ne" uiname="Robert Ahlering (sample)" uitype="lead" value="Variable3" />
</filter>
</entity>
</fetch>
3. Add the Company Name from current lead
4. Add the Lead
This query will return all active leads with the same Company Name.
B. Add a condition to check if the Query has more than 0 rows
C. Add a Page called “P01-Do you want to use one of these instead”
D. Add a field called “P01-Show all of the leads found”. this will show the other leads that we can select from.

E. Add Field called “P01-Do you want to close the above lead instead” . We need to know if they want to use the selected lead.
F. Add the check condition to see if we should use the selected lead
G. Under this we can now execute a workflow that we have already created called Lead-Qualify that copies the Account, Opportunity, and Contact information from the lead and creates the entities described. We could also put logic in there to check for existing Accounts and Contacts so we do not get duplicates.

But NOTICE how you select the P01- Show All of the Leads field that was chosen from the Page displayed.
In workflows in the past we could create entities and act upon them later in the Workflow but I never found a way to lookup and execute against a different entity with the workflows because you had to CREATE them within the workflow. No the Page Prompts are considered created within the workflow and we can act upon them. Outstanding…
H. Add the Workflow execution to mark the current lead as lost. Again this workflow was already created.
I. Now add in the Stop
J. Finish off by Qualifying the current lead since if we made it this far it should be closed.
Now activate the Dialog and test it.
This screen show this running against a lead and it is the only lead with that Company Name. No Prompts were given
The Following Screens are when I run the dialog against a lead where there are multiple leads with the same Company Name.
As you can see the workflow executed against the other lead chosen.
I hope that this provides you some value and fun times with Dialogs.