You need to sign in to do that
Don't have an account?
Greg Wehner
Validate Entered Moving Zip Code against Service Area Zip Codes
Is there a way to verify a destination zip code a user enters against a list of zip codes from our service area? We only service 50 miles from our main hub, but we still receive a lot of "dead leads" that fall outside of the 50 miles. I would like it if when users enter their destination zip code and hit entered, that the system tell them that we do not service that area (if we don't) and continue on normally if we do. Please let me know. I am a salesforce novice, so please break it down for me.
So for instance if you have a custom object called Valid Zip Codes with the following fields:
Name (store zip codes here)
You can create a validation rule (let's say on the Lead object) with the following formula:
The rule checks the records in the Valid Zip Code has a Name that matches to the zip code stored on the Lead field. If a match is not found then the error triggers. You will need to load all the valid zip codes your company services in order for the validation rule to work.
Check the following links for more information:
https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_functions_i_z.htm&language=en_US#VLOOKUP
http://developer.force.com/cookbook/recipe/validating-data-based-on-fields-in-other-records
Replace any instances that references $ObjectType.Valid_Zip_Code__c.Fields.Name with
$ObjectType.Valid_Zip_Code__c.Fields.<whatever you have named the field to store valid zip codes in the custom object >
The formula is used to create a Validation Rule against the object where your users are entering destination zip codes. Here are some info and examples of validation rules you can reference.
https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_useful_field_validation_formulas.htm&language=en
https://help.salesforce.com/HTViewHelpDoc?id=fields_about_field_validation.htm