Ask Search:
Bruce WayneBruce Wayne 

Validation rule help on Lead conversion

I am creating a VR, where a bunch of fields must not be blank when convering a lead:
AND( 
IsConverted = TRUE, 
ISPICKVAL(Type_of_Venue__c, ""), 
ISBLANK( Number_of_Seats__c ), 
ISPICKVAL(Inventory_Size__c, "" ), 
ISPICKVAL( Frequency_of_Inventory__c, "" ), 
ISPICKVAL( Avg_Time_Spent_on_Inventory__c, ""), 
ISPICKVAL( Current_Solution__c, "" ), 
ISBLANK( Pain_Priority__c ), 
ISPICKVAL( Number_of_Rev_Centres__c, "" ), 
ISPICKVAL( POS_Partner__c,"" ), 
ISBLANK( Email ), 
ISBLANK( Phone ), 
ISBLANK( Address), 
OR( 
Beer__c = true, 
Liquor__c = true, 
Wine__c = true 
) 
)
However, I can convert the lead when all the above fields are blank.  What am I missing here?  Beer__c, Liquor__c, Wine__c are all checkbox field, at least 1 of them must be checked.

Thank you for any help! 
Best Answer chosen by Bruce Wayne
Narender SinghNarender Singh
Hey Bruce,
If I am understanding this correctly then your VR should look like this:
AND(
IsConverted = TRUE,
OR(
   ISBLANK(TEXT(Type_of_Venue__c),
   ISBLANK(TEXT(Inventory_Size__c),
   ISBLANK(TEXT(Frequency_of_Inventory__c),
   ISBLANK(TEXT(Avg_Time_Spent_on_Inventory__c),
   ISBLANK(TEXT(Current_Solution__c),
   ISBLANK(TEXT(Number_of_Rev_Centres__c),
   ISBLANK(TEXT(POS_Partner__c),
   ISBLANK( Number_of_Seats__c ),
   ISBLANK( Pain_Priority__c ),
   ISBLANK( Email ),
   ISBLANK( Phone ),
   ISBLANK( Address)
  ),
 Beer__c = false, 
 Liquor__c = false, 
 Wine__c = false 
)

All Answers

Sakthivel MadeshSakthivel Madesh
Hi Bruce Wayne,

Its seem your validation rule is perfect!
Can you verify your lead conversion settings, Require Validation for Converted Leads is enabled or not? if not enabled it and try.   Setup -> Lead Settings -> Enable Require Validation for Converted Leads.

User-added image


For Debug Tips: if still not working, just remove some of the fields from formula and try to test it some scenarios and if working fine, then add the additional fields one by one to make sure to work perfectly for everything.

Please let me know if you need any more information, happy to assist you!!

Thanks & Regards,
Sakthivel Madesh
TheBlogReaders.com
SFDC Learn & Share (https://www.youtube.com/channel/UCzzwBLKpGV53Z13RHlkxwjw)
Tom HoffmanTom Hoffman
++Sakthivel - check those lead settings, but other suggestion I'd tweak your VR to use this syntax rather than the equals " "

AND(
IsConverted = TRUE,
ISBLANK(TEXT(Type_of_Venue__c),
ISBLANK(TEXT(Inventory_Size__c),
ISBLANK(TEXT(Frequency_of_Inventory__c),
ISBLANK(TEXT(Avg_Time_Spent_on_Inventory__c),
ISBLANK(TEXT(Current_Solution__c),
ISBLANK(TEXT(Number_of_Rev_Centres__c),
ISBLANK(TEXT(POS_Partner__c),
ISBLANK( Number_of_Seats__c ),
ISBLANK( Pain_Priority__c ),
ISBLANK( Email ), ISBLANK( Phone ),
ISBLANK( Address),
OR( Beer__c = true, Liquor__c = true, Wine__c = true ) )
John KnightJohn Knight
++ Tom

What's not to love about a validation rule that includes beer, liquor, and wine?
Narender SinghNarender Singh
Hey Bruce,
If I am understanding this correctly then your VR should look like this:
AND(
IsConverted = TRUE,
OR(
   ISBLANK(TEXT(Type_of_Venue__c),
   ISBLANK(TEXT(Inventory_Size__c),
   ISBLANK(TEXT(Frequency_of_Inventory__c),
   ISBLANK(TEXT(Avg_Time_Spent_on_Inventory__c),
   ISBLANK(TEXT(Current_Solution__c),
   ISBLANK(TEXT(Number_of_Rev_Centres__c),
   ISBLANK(TEXT(POS_Partner__c),
   ISBLANK( Number_of_Seats__c ),
   ISBLANK( Pain_Priority__c ),
   ISBLANK( Email ),
   ISBLANK( Phone ),
   ISBLANK( Address)
  ),
 Beer__c = false, 
 Liquor__c = false, 
 Wine__c = false 
)
This was selected as the best answer
Tom HoffmanTom Hoffman
++ Narender - I completed missed that obvious syntax change, good catch.