[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.
- Setup –> Customize –> Accounts –> Fields
- Click New.
- Select Auto Number. Next.
- 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. - Click Next.
- Click Save.
- 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]
Generate unique number for existing records I could not find this option
This also shows up when creating an auto number field
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.
Yep that’s usually a very good idea!
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
I think you would need to re-create the field to get the option…
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?
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!
How about adding a formula field that displays the account ID, and adding that to the page layout(s)?
You could do that- however the record ID is always displayed in the URL, so I haven’t found a great number of scenarios where that is really needed.
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.
Not a best practice 🙂 But yes totally supported.
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
Some of the content is locked down, including this page. To access, you will need to upgrade your account. Cheers,
John
This exercise is incomplete as you will now have 2 Account Number fields. You need to remove the Standard field from the page layout as well.
True – added a note, thanks Mark.