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
MurphmanMurphman 

Validation Rule Help!

I am trying to create validatin rule for the field called "Lead Source"  Can anyone please help?  I just want to make sure the the lead source field has be entered before my salesman convert to a opportunity.

 

Thanks

Brian

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Okay 2 ways you could do it:

 

1. You could make it required using the Page Layout editor.

 

2. You could create a VR like this:

ISBLANK(TEXT(LeadSource))

 either way you owe me a beer!

All Answers

Steve :-/Steve :-/

Do you need it only for converted Leads?

MurphmanMurphman

No after review I need it when the lead is created...

Steve :-/Steve :-/

Okay 2 ways you could do it:

 

1. You could make it required using the Page Layout editor.

 

2. You could create a VR like this:

ISBLANK(TEXT(LeadSource))

 either way you owe me a beer!

This was selected as the best answer
MurphmanMurphman

Ok on the beer!  What kind?    it seemes to work fine!

Steve :-/Steve :-/

Nectar of the Gods (and SFDC Admins) -> Pliny the Elder  

MurphmanMurphman

Sounds great!  Put it on my account for now!

MurphmanMurphman

Sorry,  But need your help again.  I have to change the validation rule to check when the lead is converted to a opportunity.  We are in the proccess of adding the web to lead form on our website and the form will not create the lead unless the user enters a valid lead source.  The customer in the website will never know the lead source. 

 

Thanks Brian

Steve :-/Steve :-/

So are you trying to write an exemption in the VR for Leads that come in via the Web?  

 

Another option would be to just have your Webmaster hard go the Lead Source in the W2L Form and update a Lead.Source in SFDC

MurphmanMurphman

That is what we are trying to do but having problems?  can you help?   I guess I owe u a 12 pack!

Steve :-/Steve :-/

Hi Murph, which one?  (I proposed 2 solutions)  the VR exemption, or the hard coded Lead Source in the W2L form?

MurphmanMurphman

The hard code in the form.

 

Thanks !!

Steve :-/Steve :-/

**bleep**! I was afraid of that...  okay I know about  THIS -><- much HTML and even less Javascript.  Bust basically what you need to do is add the Lead Source field when you genterate your W2L Code in SFDC.  Then get the value for the default Source Code for Web Leads (if you don't have one, yuo'll have to add one).  Then your web guy will just hardcode the correct Lead Source onto the webform on a hidden field.  When the person clicks "submit" the SFDC W2L code should pass the value into SFDC and your new Lead should be fine. 

 

Kinda like this:

<label for="lead_source">Lead Source</label><select  id="lead_source" name="lead_source"><option value="Web Site">Web Site</option>
</select><br>