You need to sign in to do that
Don't have an account?
Evanet
Making Fields Conditionally Required - based on picklist
Can someone help me get moving with some data validation please?
I would like to set a field as being conditionally required based on the value of a picklist. By this I don't mean field dependencies - I can manage those easily. What I have is a picklist that shows the specific order type. Based on that selection I would like to have some fields marked as required so that I can enforce some level of process control.
I found this on the validation blog so I am positive this can be done.
In a more general sense where would I find references to the language used in these validation rules?
Cheers from Oz
Mal
I would like to set a field as being conditionally required based on the value of a picklist. By this I don't mean field dependencies - I can manage those easily. What I have is a picklist that shows the specific order type. Based on that selection I would like to have some fields marked as required so that I can enforce some level of process control.
I found this on the validation blog so I am positive this can be done.
- Make Fields Conditionally Required: Use the familiar and powerful Apex formula language to make fields conditionally required (e.g., based on opportunity stage) or implement record type or role-specific business rules.
In a more general sense where would I find references to the language used in these validation rules?
Cheers from Oz
Mal
This is a validation rule between two picklists - the Opportunity Stage field and a Loss Category field:
AND ( ISPICKVAL( StageName , "Closed Lost") ,
ISPICKVAL( Loss_Category__c , ""))
This is one between the Opportunty Stage field and a text field - Loss Explanation:
AND ( LEN (Loss_Explanation__c ) = 0,
ISPICKVAL( StageName , "Closed Lost"))
Have you taken a look at this document?
http://na1.salesforce.com/help/doc/en/salesforce_useful_validation_formulas.pdf
I had a look through the document your pointed me to and tried to use a similar formula using the ISNULL function which I thought would work in a similar way to LEN = 0 but it did not.
this is what I had.
AND( ISPICKVAL( Service_Tech__c , "ISDN") , ISNULL( ISDN_Number_Range__c ) )
Any thoughts why this would not worked? The syntax checked out but it did not fire any error message.
Cheers
Mal
Cheers