Before Triggers or Validation Rules stopped working? Check Lead Settings!
The image was generated by AI in response to the query 'Require Validation for Converted Leads'

Before Triggers or Validation Rules stopped working? Check Lead Settings!

It can be quite baffling when a vital logic, for example, called during record creation with specific values on a Contact suddenly stops functioning. Or active Validation Rule doesn't validate anything...

You are reviewing any recent Salesforce updates or deployed Change Sets... But the reason for this issue remains unknown. Don't lose hope!

It's possible that changes made to the checkbox 'Require Validation for Converted Leads' in Lead Settings (earlier labeled as 'Enforce Validation and Triggers from Lead Convert') could be the cause of this problem.

According to the official documentation the before triggers associated with the following operations are fired during lead conversion only if validation and triggers for lead conversion are enabled in the organization:

  • insert of accounts, contacts, and opportunities
  • update of accounts and contacts.

You can check it!

  1. Just create the simple Before Insert Trigger on the Contact object.
  2. Convert a Lead to a new Contact with the selected Require Validation for Converted Leads checkbox.
  3. Convert a Lead to a new Contact with the deselected Require Validation for Converted Leads checkbox.
  4. Compare logs. You can see in logs that the Trigger is not fired with the deselected checkbox:

By the way, you can test similar cases with Validation Rules that are only enforced during lead conversion if validation and triggers for lead conversion are enabled in your organization.


Please have a look at the useful links ??

Andrei Shyshko

Head of Project Management Office (PMO) at Professional Software Associates Inc.

9 个月

Well... Sounds good! ??

要查看或添加评论,请登录