You need to sign in to do that
Don't have an account?
Validation: Remove requirement for specific entries
Hello,
I need assistance writing a validation that will allow my users to skip certain required fields when a specific sales stage and probability % is selected.
Key Criteria
Stage Name (Pipe Entry) - Picklist
Probability (0%) - Picklist
Required fields that should not have to be entered when the above is selected
Delivery Location (Picklist)
Entry Date (Date field)
Terms (Number field)
Potential Head Count (Number field)
Head Count (Number field)
Annual Bill Rate (Currency field)
Any help would be greatly appreciated. I can't seem to get it and my users are not able to enter their pipe entries.
Desperate,
Simone
If there is an exemption for an entire Division you could try:
Addling them to the VR
NOT(ISPICKVAL( Division , "Exempt Division Name")
AND(OR((Probability <> 0.00),NOT(ISPICKVAL( Division , "Exempt Division Name"),NOT(ISPICKVAL( StageName , "Pipe Entry"))),OR(ISPICKVAL( Delivery Location__c, ""),ISBLANK(Entry Date__c),ISBLANK(Terms__c), ISBLANK(Potential Head Count __c), ISBLANK(Head Count__c), ISBLANK(Annual Bill Rate__c)))
All Answers
Try something like this:
AND( OR( (Probability > 0.00), NOT(ISPICKVAL( StageName , "Pipe Entry"))), OR( ISPICKVAL( Delivery Location__c, ""), ISBLANK(Entry Date__c), ISBLANK(Terms__c), ISBLANK(Potential Head Count __c), ISBLANK(Head Count__c), ISBLANK(Annual Bill Rate__c)))
http://www.russianriverbrewing.com/web/brews/plinytheelder.htm
We can't go for beer's just yet...tee hee hee.
I entered the validation you sent (corrected a couple of field names/labels).
I entered a test oppty, set it to Pipe Entry with 0% probability, but the record still would not save and requested I complete the required fields....any thoughts?
Kind regards,
Salaunce
One more thought....on the probability your formula looks like its saying if Probability is greater than "0". I need it to be equal to "0".
I really appreciate your help.
Chat w/ you soon.
Salaunce
Okay, I misunderstood your original criteria. If you tweak the exempted Probabilty% you should be all set.
PS. I'm gettin' thirsty ;-)
I just replaced " > " with " = ", but still no cigar. The record continues to request that the fields be completed. Should I reverse the strategy and remove the field requirements and then right a validation so that if the entry is anything other than Pipe Entry and Probabiltiy % = 0...those fields would be required.
Can you help me write that, if you think is good solution?
Kind regards,
Simone Smith
PS. Shall I order a pitcher?
Okay, lemme take another crack at this, I'm sure we're just a AND, OR, >, = away from solving this.
Basically what you want is:
IF
Stage = "Pipe Entry"
AND
Probability = 0%
THEN
These fields are NOT required:
Delivery Location (Picklist)
Entry Date (Date field)
Terms (Number field)
Potential Head Count (Number field)
Head Count (Number field)
Annual Bill Rate (Currency field)
You got it! That is exactly what I am looking for.
PS. Frosted mug or pilsner?
Kind regards,
Simone Smith
Okay try this one, also double-check the spelling and punctuation of your Opportunity Stage picklist value, they have to match exactly otherwise the VR won't trigger properly.
AND(
OR(
(Probability <> 0.00),
NOT(ISPICKVAL( StageName , "Pipe Entry"))),
OR(
ISPICKVAL( Delivery Location__c, ""),
ISBLANK(Entry Date__c),
ISBLANK(Terms__c),
ISBLANK(Potential Head Count __c),
ISBLANK(Head Count__c),
ISBLANK(Annual Bill Rate__c)))
For Pliny, definitely a Mug (unfrosted)
Good afternoon. Unfortunately, I still recieve error messages that the fields need to be populated in order to save the record...-sigh-. Any thoughts on what else I could do to accomplish this?
Still thirsty? =)
Hmmmm... I've tested this on my Dev.SFDC.Org and it works fine.
Have you double checked your Picklist Values and the spelling and punctuation in your VR formula?
Steve,
I went back and looked at the formula to ensure the correct field labels were listed correctly for each field. On the Delivery Location (picklist field), does he " " after the field name mean...if it's blank? Here is it:
AND(OR(( Probability <> 0.00),NOT(ISPICKVAL( StageName , "Pipe Entry"))),OR(ISPICKVAL( Delivery_Location1__c , ""),ISBLANK( Entry_Date__c ),ISBLANK( Term_Number_of_Months__c ), ISBLANK( Potential_Head_Count__c ), ISBLANK( Number_of_Resources__c ), ISBLANK( Annual_Bill_Rate__c )))
I'm not strong on puncuation in formulas and tend to rely on the syntax check to proofing formulas.
Here's another confusing thing....validations ask you to enter the error message if the criteria is not met, but in this case there should not be an error message. It would just be that the record could be saved without the info being populated. Would you just enter "none" for error message and not worry about it because it won't pop up anyway? Or should I revert to workflow rules? Sorry...new to the game and lacking some fundamentals.
Kind regards
Salaunce.
Hi Saulance,
Yes
ISPICKVAL( Delivery Location__c, "")
basically means "Picklist Value selected equals nothing" OR "No Picklist Value selected"
You do need to provide an error message, but users will only see the error message if they leave the required fields blank, and the Opportunity is NOT in the exempted Stage/Probability%
Can you post your formula using the Code Clipboard (it eliminates all the smiley faces)?
Hi Steve,
Learned something new...code clipboard..makes sense! Hope this helps. - Salaunce
AND(OR(( Probability <> 0.00),NOT(ISPICKVAL( StageName , "Pipe Entry"))),OR(ISPICKVAL( Delivery_Location1__c , ""),ISBLANK( Entry_Date__c ),ISBLANK( Term_Number_of_Months__c ), ISBLANK( Potential_Head_Count__c ), ISBLANK( Number_of_Resources__c ), ISBLANK( Annual_Bill_Rate__c )))
Hi Steve,
Yes. I only have two other validations for opportunities.
They are as follows:
This one forces the user to enter comments when they make changes to specific fields.
AND(OR(ISCHANGED(CloseDate), ISCHANGED(Estimated_Contract_Value__c), ISCHANGED(Term_Number_of_Months1__c), ISCHANGED(Bill_Rate1__c), ISCHANGED(Number_of_Resources1__c )), NOT(ISCHANGED(Opportunity_Change_Comments__c)),ISPICKVAL( S_Division__c , "SSC"))
AND
This one will not allow sales reps to save oppty record if sales stage is proposal or better and ECV is null
AND ( OR ( ISPICKVAL(StageName, "Proposal"), ISPICKVAL(StageName, "MSA Status")), ISBLANK( Estimated_Contract_Value__c ) ,ISPICKVAL( S_Division__c , "SSC"))
Pipe Entry is the inital stage of entry.
Steve,
I have 16 required fields on the oppty layout. They are listed below. I wonder if it would help if we included...AND Division equals SSC. This validation rule will only apply to users creating opportunities from the SSC Divsion.
Okay, I think that's those might be the culprit. Try removing the Page Layout Requirements and just use the VR Requirements.
Do you users in this Division also have a specific User Profile? or do they have the same Profile as other users and vice versa?
The users in this division have the same profiles as others. This is something we are going to address this year...cleaning up profiles. With that being said, what would I add to our current VR formula to make it specific to oppty records that had SSC listed as the division.
I really appreciate you helping me narrow this down!
Kind regards,
Salaunce
If there is an exemption for an entire Division you could try:
Addling them to the VR
NOT(ISPICKVAL( Division , "Exempt Division Name")
AND(OR((Probability <> 0.00),NOT(ISPICKVAL( Division , "Exempt Division Name"),NOT(ISPICKVAL( StageName , "Pipe Entry"))),OR(ISPICKVAL( Delivery Location__c, ""),ISBLANK(Entry Date__c),ISBLANK(Terms__c), ISBLANK(Potential Head Count __c), ISBLANK(Head Count__c), ISBLANK(Annual Bill Rate__c)))
Mission Control....we have lift off! Worked like a charm....removed requirements and added add'l division info to VR...and wah lah!
Thanks so much Steve!!!!!