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

How to by pass opportunity validation during lead conversion


   Is there a way to by pass opportunity valdiation during lead conversion. Please suggest. 

Harpreet On CloudHarpreet On Cloud
Are you talking about mandatory fields like Close Date or any other custom validations? Mandatory field requirements, I don't think it is possible.

For the other custom validations, you can create a checkbox on Opportunity that gets set only while you are creating an Opportunity from Lead. You would need to create a checkbox field on Lead with default value as checked. Then you map the Lead Checbox field with Opportunity Checkbox field. So whenenver Opportunity is created from Lead, the Opp Checkbox will be checked. You can then add additional condition on your custom validation rules involving this Opp checkbox and by pass the validation for Opportunities getting creating from Lead.
Maharajan CMaharajan C
Hi Sudhir,

Create the two check box fields one in Lead and one in Opportunity.

In the Lead Set this field as Default = Checked.
In the Opportunity Set this field as Default = Un Checked.

And in the Lead mapping map these fields.

In the Validation Rule Add one more  Conditions as Opportunity checkbox field is false then fire.

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!