You need to sign in to do that
Don't have an account?
Newbie Needs Help
I have a fresh install of SalesForce and I'm working on learning how to validate fields. I've done some validation on several fields but one has me stumped...
We are a sales organization who sells directly to the public and indirectly through distributors and resellers. On the Accounts tab under Account Detail we have the Account Type pick list. This is populated with End User, Var and Reseller. Directly under Account Type we have a pick list (custom field) called Distributor that lists the names of available Distributors.
If the sales rep choses Reseller OR Var from the Account Type picklist, then they must also chose from the name of the Distributor they are assigned to from the Distributor pick list just below it.
I'm having problems creating the validation for this. I know I have to use the ISPICKVAL value but I'm not sure of the sintax.
Thanks for the help,
Steve
Try something like this
AND ( ISPICKVAL(Picklist_2__c, ""),
OR( ISPICKVAL(Picklist_1__c, "A"), ISPICKVAL(Picklist_1__c, "B")))
so it should look something like:
AND ( ISPICKVAL(Distributer__c, ""),
OR( ISPICKVAL(type, "Reseller"), ISPICKVAL(type, "VAR")))
All Answers
Can you give me a little more detail?
Does each user in your SFDC Org have a specific Distributor assigned to them? Is the Distributor assigned to the user on the User Object, or is it based on their UserRole or something else?
Can you post an example of your code using the Clipboard [C] icon above?
There are no other rules to the organization, this is a very simple org, resellers are asigned to distributors because they want to purchase through that distributor they are not asigned to them by any other means. Reps are not asigned to distributors.
This is just a simple validation with no other rules applied to it. If the account type is set to Reseller or Var then the Distributor field can not be blank.
Thanks,
Steven
P.S. Both the Type field and the Distributor fields are Pick Lists. Something like
ISPICKVAL(type, "Partner/VAR" ) && (Distributer__c = " " )
does not work.
Try something like this
AND ( ISPICKVAL(Picklist_2__c, ""),
OR( ISPICKVAL(Picklist_1__c, "A"), ISPICKVAL(Picklist_1__c, "B")))
so it should look something like:
AND ( ISPICKVAL(Distributer__c, ""),
OR( ISPICKVAL(type, "Reseller"), ISPICKVAL(type, "VAR")))
Steve, Thank you very much, that worked perfectly.
No problem,
When you speak of me, speak well... :smileywink: