How To Map The Standard Lead Description Field to Opportunity Description Field In Salesforce

Amit Arora
Mar 28, 2019 · 4 min read
Image for post
Image for post

Have you ever wanted to map a standard lead field from Leads to standard fields on Opportunities? Of course, you have! That is why you’re reading this.

I recently had to do this exercise for a client of ours.

Salesforce does not allow you to re-map standard fields to change their object mapping. It would be super easy if I could just point the lead Description field to the Opportunity description field. By default, the Lead description field maps to the contact object.

The Not So Good Solution:

So first I decided to go with 2 formula fields, 1 on lead and 1 on the opportunity. On the lead object, I created a custom text field called Description__c and did the same on the opportunity object.

Then I created 1 Workflow Rule (WFR) on the lead object that would update the Description__c field whenever the lead was created or edited to meet the criteria.

Image for post
Image for post
Lead Workflow Rule with Evaluation Criteria

I set the rule criteria saying Lead: Description Field NOT EQUAL TO null. And to evaluate the rule when a record is created, and every time it’s edited.

The issue comes in when I try to re-create the same rule on the opportunity object. After I mapped the custom fields from Lead <> Opportunity, I created a WFR on the Opportunity Object to update the Standard description field with the Description__c custom field. Here’s what that WFR looks like:

Image for post
Image for post
Opportunity Workflow Rule with Evaluation Criteria

Now in most cases this “should” work. However, the ORG that I was working on was a mature org with a shit ton of WFR’s, Validation Rules, Apex Classes, etc. And this WFR was somehow causing a recursion, which in turn would not allow me to convert the Lead to an Opportunity. I would get an error message on the conversion window.

Process Builder To The Rescue!

So here is where I decided to switch to Process Builder to update the description field. I want to give a huge shoutout to my good friend George for helping me with the PB (not Peanut Butter). This is what my new process looks like and it works like a charm.

Image for post
Image for post

The best thing about using Process Builder is that I was able to map standard fields from lead to opportunity.

Step 1 > Entry Criteria

In the Set Conditions section, you’re going to look for 2 fields i.e.
- IsConverted = True
- Description (Is Null), Boolean = False

So this tells the system that when a lead is converted and the description field is not blank — go do something.

p.s. don’t forget to check the box under the advanced section i.e. “ Do you want to execute the actions only when specified changes are made to the record?”

Then I put a wait time of 0 days After the created date. This is an important step in the process because it gives Salesforce some time to go ahead and create the opportunity and grab that unique opportunity ID before actually send the field values over. If you skip this step the process will not work.

Step 2: Scheduled Action

This one is pretty straight forward. Choose the Record related to the lead and then select the Converted Opportunity ID field.

Image for post
Image for post

Step 3: Update Opportunity Description Field with Lead Description Field

Now simply enter your update criteria and watch the magic happen!

Image for post
Image for post

1 last thing to remember is that the description field is not going to map instantly. There is about a 30-second delay in mapping the 2 fields.

Let me know what you thought of this tutorial in the comments below!

sfdcmastery

Tips and tricks for Salesforce Admins

Amit Arora

Written by

6X Salesforce ☁️ Certified | Certified Sales Cloud Consultant | Service Cloud Consultant | Community Cloud Consultant | Platform App Builder

sfdcmastery

Tips and tricks for Salesforce Admins

Amit Arora

Written by

6X Salesforce ☁️ Certified | Certified Sales Cloud Consultant | Service Cloud Consultant | Community Cloud Consultant | Platform App Builder

sfdcmastery

Tips and tricks for Salesforce Admins

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store