Project Description
This is a solution for crm 2011 for autonumbering the configurated entity.

As an unmanaged solution, files included are:
1. A plugin for sequence generation : CRM.Plugin.SequenceGenerator
2. A custom entity for configuration: Counter
3. Three icons for the custom entity.

(Resources (entity schema, icons were orginally created by other open source auto number plugins )


Please report if there are problems.

NOTE Click Documentation Tab for More details

Code Refreshed of locking method.

Plugin Registration

Use CRM 2011 plugin registration tool to register the plugin:
Message: Create
Primary Entity: the entity which will use the plugin to generate the sequence automatically
Eventing Pipleline Stage of Execution: Pre-operation (CRM 2011 only)

Others as default.

Important Info

1. Security Role settings: To make sure you give "Read" and "Write" privilege for the "counter" entity to certain security roles. Otherwise the current position will not be updated by the plugin by the current user who triggered the plugin

2. In the couter entity:

  • Entity Name is the definition name of the entity which you want to use the plugin with. For example: account or new_bill
  • Auto Number Property Number is the name of the attribute where the number is stored. For example: accountnumber or new_billno
  • Current Position is the field where the plugin will read and write the sequence. Assign 0 when you create a new configuration record in the counter entity.
  • Define Prefix or Postfix is required. (NOTE: If prefix or postfix is assigned, make sure the attribute in the target entity is a text field)


Additional information on starting a new project is available here: Project Startup Guide.

Last edited Jul 30, 2012 at 10:36 AM by jaimieji, version 8