function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saurabh Bisht 23Saurabh Bisht 23 

Populate "primary contact" on opportunity at lead conversion using before trigger ?

Salesforce Flow: Populate "primary contact" on opportunity at lead conversion using before trigger ?
Primary_Contact is Custom field
----------------------------------------------------------------------------------------------
Please Do it in Flows
Maharajan CMaharajan C
Hi Saurabh,

Are u looking to populate the converted contact id as primary contact in Opportunity? If yes you can do it in the below ways. 

Once Lead is converted, the opportunity Id and converted contact Id are both available in the lead record. So you can perform this action via the Lead after update trigger or the Lead object's Record Trigger Flow.

Trigger :
https://salesforce.stackexchange.com/questions/36602/populate-lookup-field-on-opportunity-upon-lead-conversion

Flow: 
1. Create new Record Triiger Flow on Lead Object.
2. *Trigger the Flow When: ==> A record is updated.
3. 
Set condition as IsConverted equals True.
4. Optimize the Flow for:  Actions and Related Records
5. Select Update Record Element. Follow the below screenshot.

User-added image


User-added image


Thanks,
Maharajan.C
Saurabh Bisht 23Saurabh Bisht 23
Hi Maharajan.C
YOUR GIVEN STEPS IN FLOWS that flows work on after trigger i need on before trigger if it possible tell me