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
dkgmdkgm 

Validation Rule For Lead Conversion

Hi,

 

 I want to write a validation rule on  lead conversion.The condition will be like this:-

   i. Lead status is a picklist value.If lead status is  'NDA Signed' then it will convert the lead.If lead status is except the NDA Signed and I will click the convert button it will display an error meassage like 'lead conversion not possible'.

LAVAN_SFLAVAN_SF

A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”.

 

We can validate the fields only. We can't apply validation rule for any buttons, if you want to achieve your scenario you have to go for trigger or apex.

souvik9086souvik9086

NOT(ISPICKVAL( Status , 'NDA Signed') )

 

Try this.

 

If status will be any other than  'NDA Signed' then error will throw.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

Kamatchi Devi SargunanathanKamatchi Devi Sargunanathan

Hi,

 

Validation only applies to the fields to check the values are entered correctly or not only before record creation. It can't be applied after a record is created.

 

You can achieve this by doing controller logic using VF page by overriding the standard button 'Convert'.

Otherwise, you can create your own custom button and apply onclick javascript to the button to check the functionality.

 

 


Hope this helps you...!

 

Thanks,

Kamatchi Devi

SoloSolo
Hello,

Here is a review of solutions to enforce Sales to enter values to required Lead fields before the Conversion.
Article also haw a code example for custom button to override the standard 'Convert' button

http://salesforce.websolo.ca/2014/07/custom-validation-rule-for-lead.html

Regards,
Evgeny