Loading

How to get field dependency to work during Lead conversion in Salesforce

Data pubblicazione: Sep 28, 2026
Descrizione

An organization is tracking memberships in a custom object (Membership__c) and the membership record is generated when a 'Member' Lead type is converted. 
The Member lead record has a controlling picklist field called 'Membership Tier' and a dependent picklist field called 'Membership Price' and the similar dependency exist on the membership object. There is also a field called 'Lead Type' that has 'Member' as one of the picklist values that denotes that it is a membership lead. 
While lead conversion, the organization Is facing issues bringing these dependency field values from Lead record to the membership object dependency fields. 

Risoluzione

We are going to create a Record-Triggered Flow for this use case.

 

Note: Make sure Controlling and Dependent picklist fields (i.e. Membership Tier and Membership Price) on both Lead and Membership object have the same picklist values and dependencies.

 

For instance:
'Membership Tier' has picklist values ('Tier A', 'Tier B') and 'Membership Price' has picklist values ('Value 1', 'Value 2', 'Value 3', 'Value 4').


If on Lead object, the dependency is set in a way that if you select 'Tier A' on the 'Membership Tier' field, you can see 'Value 1' and 'Value 2' are available under the 'Membership Price' field and if you select 'Tier B' on the 'Membership Tier' field, you can see 'Value 3' and 'Value 4' are available under the 'Membership Price' field.


On the 'Membership' object, if the dependency is set in a way that if you select 'Tier A' on the 'Membership Tier' field, you can see 'Value 1' , 'Value 2' and 'Value 3' are available under the 'Membership Price' field and if you select 'Tier B' on the 'Membership Tier' field, you can see 'Value 4' are available under the 'Membership Price' field.


Now, if a 'Member' lead type is converted having the 'Tier A' on the 'Membership Tier' field and 'Value 3' is selected under the 'Membership Price' field, then the Flow will fail and throw an error "We cannot convert this lead because some values are restricted on the contact, account, or opportunity. Ask your admin to check the field mappings."

 

So, make sure the Controlling and Dependent picklist fields match on both the objects.


In order to create a Record-Triggered Flow, follow the steps provided below:

 

Step 1: Login to your Salesforce account.

 Click on the Gear Icon in the upper right corner of your screen and select Setup

Setup menu accessed from the gear icon in the top right corner

 

Step 2: Search for Flows 

From the Quick Find box, search for Flows and select the New Flow button

Flows setup page with the New Flow button highlighted

 

Step 3: Create the Record Trigger Flow 

Select Record-Triggered Flow and hit the Create button

Flow type selection screen with Record-Triggered Flow highlighted

 

Step 4: Set the Trigger

Once the Flow canvas opens, set up the trigger on the Lead object (which is our source object). The trigger is set to fire whenever a lead is converted and 'Member' Lead Type (Lead_Type__c) value is selected

 

Here, the Lead Type is a custom picklist field on the Lead object where one of the picklist value is 'Member' denoting that it is a Membership type Lead.


In the Start element, provide the following values:

ObjectLead
Trigger the Flow whenA record is updated
Entry Conditions (Condition Requirements) All Conditions Are Met (AND)
Logic (IsConverted    Equals    True)    AND    (Lead_Type__c    Equals    Member)
When to run the Flow for updated records  Only when a record is updated to meet the condition requirements
Optimize the Flow for   Action and Related Records

 

Flow Start element configured with the Lead object trigger conditions

 

Step 5: Bring the Create Records Element In 

As the trigger is set on the Lead record, now bring the Create Records element on the canvas which will be used to create the Membership record on the conversion of a 'Member' Lead type

 

In the Create Records element, substitute the following values:

Label

Create Membership Record (Provide any suitable name. We have selected Create Membership Record)

Description Provide any suitable description (Note: It's not required but it's a best practice to provide descriptions)
How Many Records to CreateOne 
How to Set the Record Fields Use separate resources and literal values
ObjectMembership
Set Field Values for the Membership Account__c                        <--    {!$Record.ConvertedAccountId}
Membership_Tier__c       <--    {!$Record.Member_Tier__c}
Membership_Price__c     <--    {!$Record.Membership_Price__c}

 

Step 6: Connect the Start Element

Now connect the Start element and the Create Records element we used so that the connection will be set up

 

Flow canvas showing the Start element connected to the Create Records element

 

Step 7: Save the Flow 

In the top right side of the canvas, select Save button and provide the suitable Flow name (It is a best practice to provide descriptions)

 

Flow save dialog with a name field


Step 8: Activate the Flow 

Finally, click on the Activate button available next to the Save button to activate the Flow

Flow canvas with the Activate button highlighted

_____________________________________________
Written by: 
Ajaypreet Singh Saini | Salesforce Answers Leader
Ajaypreet Singh Saini is working as a Salesforce Implementation Specialist at Grantbook. Prior to Grantbook, Ajaypreet served as a Salesforce Administrator for 2 years working on Sales Cloud where he was responsible for configuring and administrating complex processes and maintaining security of Salesforce Instance.


Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials).  Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third  Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality,  usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
 

Numero articolo Knowledge

001128141

 
Caricamento
Salesforce Help | Article