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

Autoconvert lead into JUST an opportunity

I know there are a lot of autoconvert triggers out there for leads that flip it into an account, opp, and contact upon lead creation.  But...I need a trigger that autoconverts a lead (based on the value in one field) into JUST an opportunity, and assigns that opportunity to an existing account.


I know for these leads that come in, that there will ALWAYS be an account already in Salesforce.  So I just want the trigger to search contacts based on email address, and when a contact is found whose email matches the new lead email, autoconvert the lead to an opportunity, and assign it to the account to which that contact that was matched to the lead email belongs.


Any code help here is much appreciated.





I would assume the best way is to search for the existing account and set the account id to that value