Activity Forums Salesforce® Discussions How to get the city or state information based on zip code?

  • Ravi

    Member
    April 26, 2016 at 9:52 am

    Hi Utsav,

    There are a few third party apps  on the app exchange that will help you do this.

    http://appexchange.salesforce.com/listingDetail?listingId=a0N30000002zt9uEAA.

    If you don't want to use third party App then you have to do some tedious work :

    Create a custom object for zip codes where the name field is the Zip Code. Add a text fields to this object for City . Upload all of your zip codes/city to this new object using the data loader or manually create each one, but that sounds painful.

    Add a look-up relationship field to the object that you want that is related to this new Zip Code object.

    The end user can point this new field to the appropriate Zip Code object by searching the zip code numbers. A formula(s) or work rule can then be used to pull the city into a field(s) on the main object.

  • vishakha

    Member
    October 22, 2022 at 8:00 am

    To get the city or state information based on Zip code, what you can do is create a map with zip code as a key and query to obtain the required values.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos