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
prady-cmprady-cm 

how do we identify if an opportunity is converted from lead ?

Hi,

 

Is there a way to identify if an opportunity is converted from lead or not in apex?

 

Thanks

 

Navatar_DbSupNavatar_DbSup

Hi,


You can create a custom report on Leads with converted lead information. This report will contain the Opportunity detail also which are create by lead conversion.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

vijaymindvijaymind

Hi , 

Yes we can do that by lead field mapping , just create the same field fied type on both Opportunity And Lead and map both field .

by clicking on Lead field and Map Lead Field .

 

let say I have created a field of boolean type on Opportunity and same on lead now we can map both two each other.

What ever value would be in lead once converted in to the opportunity that field values would also be the same .

In this way we can compare the opportunity is comming from converted lead.

 

Shawna.ax1585Shawna.ax1585

But if you clone an opportunity that value will carry over to the cloned opp.  Is there a way to clear this value when an opportunity has been cloned?  

SimplySfdcSimplySfdc
Shawna, what I can suggest for easy to differentiate if the opportunity being clone.
Use datetime as the identifier field, so user will know easier if created date time <> converted date time, we know it is a clone opportunity