3

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?

8

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.
| improve this answer | |
  • 2
    Maybe a quick sample SoQL for the OP? :) – Sebastian Kessel May 17 '16 at 22:28
  • 1
    N.B. OP can also change the labels of the aforementioned fields if OP wanted to strip away the Billing or Shipping prefix using Tab Names and Labels in Setup – cropredy May 18 '16 at 1:44
  • 1
    @crop Good point. I just re-labelled Shipping to Primary. I'll add steps for that. – Adrian Larson May 18 '16 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.