Fields: Scenario 1 Solution

[ScenarioSolutionIntro ]

[sc:ScenarioSolution ]

[RCNotLoggedInNotAdmin]

[/RCNotLoggedInNotAdmin]

[RCAdmin]

For Salesforce to generate the unique number, an auto number field must be created.  Since the standard field “Account Number” is a text field, a new custom field must be created (as you cannot change the field type of a standard field).

[sc:ScenarioSolutionSteps ]

Create “Customer Number” field on Account.

  1. Setup –> Customize –> Accounts –> Fields
  2. Click New.
  3. Select Auto Number.  Next.
  4. Enter label “Customer Number”.
    Display format “{0}”  – experiment with different options here!
    Starting number 1.  Optionally, you could use a higher starting number (e.g. 1000) to prevent giving a customer an unusually short customer number.
    Check “‘Generate Auto Number for existing records”.
    Click Next.
  5. Click Next.
  6. Click Save.
  7. Click OK (to the auto number warning).

If you already have the “Account Number” field listed on the page layout, you may want to remove it for clarity.

[/RCAdmin]

16 thoughts on “Fields: Scenario 1 Solution”

  1. In this case the number is only unique within the Object the field is created, right? I find it handy to add a prefix to the auto-numbers to indicate from what object the number came from. This can be helpful when you start communicating those numbers (as a reference) outside of Salesforce, for example in an email to wards your customer.

  2. It did not give me the option to generate the auto number for existing accounts. It generates for new accounts only. How can I change that?

    Thanks,

    Matt

  3. John, do you know how to create the unique number for only a limited number of the Accounts? I think most organizations have “a gazillion” Accounts but in the scenario described in this exercise it would be more practical to apply the auto number only for accounts that meet certain criteria such as having a “yes” checkbox for “active account” (for example). Is that even possible?

    1. The short answer: no, it is not possible.

      What you can do in this scenario is create an autonumber field. Then create a formula field that only exposes the auto number field when the formula criteria is true.

      This will allow you to only display the ID when the conditions are met, but all records will be assigned an ID regardless.

      Or… use apex code to selectively create IDs, but there is no standard config that would let you do this. Great q!

  4. I learned from this exercise that field labels don’t have to be unique, as long as the field name / API name is unique. So, my Account pages had two fields labelled Account Number until i removed the old field from the page layouts.

  5. hello john,,

    i getting this message when i tried to access this video :

    To view the remainder of this content, you must purchase the Salesforce.com Certified Administrator Study Guide. Please Login or purchase the study guide.

    despite i do purchase with paypal, also i watched the Field Usage & Field Types without any problems

    Thaer Saleem

Leave a Reply