+ Start a Discussion
sudha76sudha76 

Create a process on Account and Contact to get complete data bu bypass on Lead Conversion.

Hi there,

 

I have a very unique sitatuon and possible a hard one to solve. I have this Validation Rule on the Contacts

 

 

AND(

OR(ISBLANK( LeadConverted2_ctc__c ),

AND(NOT(ISNEW()),

LeadConverted2_ctc__c =1

)

),

OR(

ISBLANK( Title ),

ISBLANK( Phone ),

ISBLANK( Email )

),

NOT(ISPICKVAL( LeadSource , "XYZ")))

 

 

We have data coming from the outside source which comes as a LEAD and in that external app we do not capture Title of the Lead. So this RULE should not kick in when the data is being fed from the external app as a LEAD.

I tried to solve the above by capturing the Lead Source. But here is another challenge that I am facing:-

 

If the LEAD that is being converted has a LEAD Source = XYZ and the Contact that is being attached to also has the same LEAD Source, then the Val Rule does not get ignored and gives the error message that Title, Phone and Email is required.

 

If the Contact's LEAD Source = SFDC then the Validation Rule is easily by passed.  I want this to happen at all lead conversion.

 

I want the Validation Rule not to kick in on the Lead Conversion.

 

Can I do this with Val Rule or is APEX the answer?

 

please help

 

 

 

 

 

SFFSFF

When I have done something similar, what I did is set up a checkbox field on the Lead, defaulted to true. Then I set up another checkbox on the Account (in my case) defaulted to false. I made both checkboxes read-only on the page layout. Then I set up field mapping from Lead to Account so the Lead's checkbox is copied to the Account's checkbox, updating it to true. That way I know that the Account was created via conversion. At that point, it is trivial to adjust the validation rules to fire, or not fire, on lead conversion.

 

Hope this helps,

sudha76sudha76

i do not think that is going to work out. If you look at my rule, I am already doing quite similiar with the formula and number fields on Lead and Contact.

 

The Rule does kick when the lead is converted and the contact that it is being attached to does not have the complete data like - Phone, or Email or just the title is missing.

 

So if the LEAD has the complete data , and it gets convert and creates a new record - the RULE does not kick in. This is good.

 

But, if the same LEAD which has the complete data and gets ATTACHED to the existing CONTACT or ACCOUNT,  and that record has anything missing, like TITLE then the RULE kicks in. This is the problem.

 

Any suggestions?

Ritesh AswaneyRitesh Aswaney
AND( 
NOT(AND(
ISNEW(),
NOT(ISBLANK(LeadConverted2_ctc__c)),
ISPICKVAL( LeadSource , "PMI"))
), 
OR( 
ISBLANK( Title ), 
ISBLANK( Phone ), 
ISBLANK( Email )) 
)