CRM 2011 Dialogs have added a new hidden feature that ROCKS!

by Bill Owens 13. July 2011 02:06

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

leadq1

 

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.

d3

B. Add a condition to check if the Query has more than 0 rows

d4

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.

d5

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.

d6

F. Add the check condition to see if we should use the selected lead

d7

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.

d8

But NOTICE how you select the P01- Show All of the Leads field that was chosen from the Page displayed.

d9

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.

d10

I. Now add in the Stop

d11

J. Finish off by Qualifying the current lead since if we made it this far it should be closed.

d12

 

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

d13

 

The Following Screens are when I run the dialog against a lead where there are multiple leads with the same Company Name.

a1

 

a3

As you can see the workflow executed against the other lead chosen.

a4

 

I hope that this provides you some value and fun times with Dialogs.

Tags: ,

CRM 2011

Page List

About the author

I work for a consulting firm in Dublin Ohio called Affiliated Resource Group. For the last five years I have been spearheading our Microsoft Dynamics CRM practice. I have a deep appreciation for the Microsoft CRM platform and I am very excited about it. You might even describe me as a Microsoft CRM Advocate. I have many battle scars from my experience with the product and I’m constantly being asked questions about CRM and how-to-do something in it. Hence, this BLOG is to help disseminate that knowledge and information to everyone. As of last year I was posting links to many other blogs to help spread the knowledge, but now with the community.dynamics.com doing that for me, I will be following that practice unless a really juicy article catches my eye. Many people have asked where my post are for the first half of 2010, my company had me posting to another blog and maintain two was near impossible. I am now down to just this blog. So good luck and I hope that this blog may help in some way. If you have suggestions or questions, please email me them.

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 BillOnCRM