Saturday, February 23, 2013

MSCRM 2011: A Relationship to an Account AND Contact on a Qualification of a Lead


A Client recently asked if it was possible when qualifying a Lead to an Opportunity that a relationship be built from that Opportunity to a Contact AND an Account. The client wants to maintain the history of the Opportunity with the contact even if the contact moves to a different organization.
Typically when a Lead is qualified to an Opportunity, the relationship is built to an Account ONLY when there is data entered in the Company Name field of the Lead.  So if the Company name field has data, a relationship is built to the Account and NOT the Contact. In order to get around this, the following customizations need to be performed:

1)     Hide the Company name field currently on the Lead and replace with a custom field (Organization Name) for the Company/Organization Name to be entered.

2)     Create a Process (Workflow) that is executed when an Opportunity is created and the Originating Lead field on the Opportunity contains data. The workflow will perform the following:

a.     Create an Account with the Account Name = Organization Name from the Originating Lead. Map all of the appropriate fields from the Originating Lead to the Account  in the workflow.

b.     Update the Potential Customer (Contact) Parent Customer to the Account created in a. above with the Account (local value).

c.     Update the Opportunity with the Account created in a. above.

 Note: The Lead should only ever be qualified with the Contact.

In the Opportunity Module, the Parent Customer should always contain a Contact. There will also be a lookup field to the Account (relationship to Account) added to the form that will display the Parent Account of the Contact at the time the Opportunity is created.

This should do the trick of ensuring that a relationship to an Account AND Contact is created to an Opportunity when a Lead is Qualified.

No comments: