[SalesForce] Best way to get city, state, and zip fields onto Account object

The Account object doesn't have city, state, or zip standard fields. I can create those in custom fields, but feel like there should be a better way to do that?

We want to be able to pull a report of all our California accounts, or pull all the accounts on in a West Coast state.

What would be the best way to set that up?

Best Answer

There are two standard composite address fields, either of which should suit your needs.

  • BillingAddress
    • BillingCity
    • BillingState
    • BillingPostalCode
  • ShippingAddress
    • ShippingCity
    • ShippingState
    • ShippingPostalCode

Once your fields are on the Page Layout and you have data populated, you can get this data via a query as follows. You can apply a similar filter in any Report.

SELECT BillingCity, BillingState, BillingPostalCode FROM Account WHERE BillingState = 'CA'

If you want to relabel these fields:

  1. Go to Customize > Tab Names and Labels > Rename Tabs and Labels.
  2. Next to Accounts, click the Edit link.
  3. Click the Next button.
  4. Change the labels as needed.
  5. Click the Save button.
Related Topic