Apex Triggers don’t need to be complicated. If you have worked with databases like SQL Server or MySQL the triggers execute in a very similar fashion. Continue reading
In the blog post “What’s the difference between a Lead and Opportunity?” I spent a bit of time covering how leads are converted into accounts, contacts, and opportunities.
Basically, a lead is converted when the sales person thinks that there’s actually an opportunity to sell them something. In a lot of cases, it might make sense of for leads to be automatically converted after a field is set to a certain value. For example, a lot of companies might want to automatically convert a Lead as soon as the Sales Rep has completed ANUM or BANT.
To convert a Lead into an Account, Contact and an Opportuninity we need to make use of the Database.convertLead method.