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
EtienneCoutantEtienneCoutant 

trigger on Contact before insert and Lead conversion

Hi,

 

When the Contact creation is part of a Lead conversion, before insert triggers that I have on Contact are not triggered. Is there a workaround?

Thx! 

EtienneCoutantEtienneCoutant
This page: http://www.salesforce.com/us/developer/docs/apexcode/index.htm says that:
 
Before triggers associated with the following operations are only fired during lead conversion if validation and triggers for lead conversion are enabled in the organization:

    * insert of accounts, contacts, and opportunities
 
How do we enable validation and triggers for lead conversion??  
jkucerajkucera

Submit a case to support asking them to turn on Advance Lead Convert.  It's also called Apex Lead Convert.

 

Once turned on, the save order changes, which means things happen in a different sequence:

  • Lead is converted
  • Account is created & all account triggers, workflow, etc fire
  • Oppty created & ...
  • Contact created & ...
  • Converted Lead updated w/ Id's for each object

JamesCoopeViconJamesCoopeVicon

How can you tell if advanced lead convert is on or off? 

 

Does this allow use of convert lead as an Apex page controller or lead controller extension?  

jkucerajkucera

Setup-->Customize-->Leads-->Settings-->Enforce Validation & Triggers from Lead Convert = True

 

If you don't have it, I believe that option is either false or not shown in the Settings page.

Muhammad Anas 19Muhammad Anas 19
@jkucera I have "Require Validation for Converted Leads" instead of "Enforce Validation & Triggers from Lead Convert".

Is this a new label for the same setting or is it a different setting?

The tooltip says: "When users convert leads, enforce: required field settings, field validation rules, workflow actions, and Apex triggers."