Here are the steps to define a new auto number configuration.
  • Once the solution is installed, you will see a new entity called Counters under Settings -> Extensions. Click the New button to create new Auto Number configuration.

  • By default, the form will have the Current Position and Display format fields populated. All you need is to populate the Entity Name and the Auto Number Attribute Name that you want the auto number to be generated for. You can configure multiple auto generated number fields for the same entity.

  • In this example, we want to configure the auto number for the Account Number field in the format of ACC-00001. To accomplish this, we need to do:
    • Put "account" as the Entity Name
    • Put "accountnumber" as the Auto Number Attribute Name
    • Update the Display format to ACC-{CurrentPosition.PadZero(5)}
    • Click Save and Close.
The Advanced CRM 2011 Auto Number is very flexible and it supports a number of different scenarios. To see all supported display formats, please refer to the Refer to the CustomAutoNumberFormat page.

  • Create a new account and upon saving of the record, you will see that a new auto number is generated.

Last edited May 20, 2012 at 10:32 AM by xrmbits, version 1

Comments

Jammy27 May 23, 2014 at 9:02 PM 
Hi. Great code, but in a appointment entity doesn´t work. The fault is "Query Builder Error". What can I do?

mathewhere Apr 1, 2014 at 1:05 PM 
Hi,
I have to create the ID for my contact entity. I tried this plugin and it didn't work.

Mathew

CrackerMF7 Jan 3, 2014 at 5:31 PM 
Hello, I am having an issue when trying to revise a quote. If I create a quote, activate it, and then click revise, the quote ID increases as if it's a new quote. It should keep the same quote ID as before, but with revision # increase. Any suggestions would be appreciated.

meldred Oct 4, 2013 at 5:07 PM 
If the counter is a new field, how do you add it to the form. Is the auto number attribute name the same as the new field name?

IanCRM May 29, 2012 at 2:52 AM 
Great code.. I'm new to CRM 2011 and need a little help.. The installation went well and I've been able to incriment the counter each time I create a new Opportunity. Perhaps I'm dum but where is the field with the autonumber in it.. Some details.. For the Counter record..
Entity Name: Opportunity,
Auto number Attribute Name: OpportunityAutoNumber

Thanks