- January 17, 2016
- Posted by: Raz Dynamics
- Category: Free CRM Tools & Plugins, Microsoft Dynamics CRM
Auto numbering is a common requirement for most CRM Implementations to generate a Unique Reference Number for new records so they can easily be tracked, and is also useful for integrations. Its often a common issue as most users will try using a workflow alone to generate autonumber, which is only reliable for simple low load and low concurrency scenarios. For High load and concurrency such as during import or for many concurrent users then the most reliable approach is using an autonumber plugin that uses locking to secure the unique value of the number generation. My Autonumber Workflow Activity solution allows you to include autonumber in your custom workflow and gives the user the ability to Define;
- Prefix
- Suffix
- Starting Number for increment Reference
You can download my Autonumber Solution from the following download form at the bottom of this post;
Once you have downloaded the solution, you should navigate to Settings and you will see the AN Configuration, You will need to create a new configuration record for each Autonumber field you want to generate on an entity. The Autonumber Plugin solution works by generating a Prefixed unique number which is incremented by 1 for every new Opportunity created. If for any reason a unique number is not automatically generated for a given record, we would have to refer back to AN Configuration.
You can either create a new Text field to be used as the autonumber reference or use an existing text field. This will then be used by the AN Configuration to generate the reference number based on the configuration you provide. Here you can provide your Prefix, Suffix as well as the initial Next number that will be incremented by 1 every time a new record is created.
You will also notice an entity called, Locker which you do not have to set, this record is created automatically once the AN Configuration is set and Activated. This is to preserve the concurrency so if 2 users simultaneously create a record at the exact time the plugin ensures a unique reference number is generated.
The AutoNumber Solution consists of the following objects
Workflow Process: To Create a Locker object, ensure this is Activated so that is Creates the Locker Object when the AN Configuration is setup.
Assemblies: For Automatic Number generation (AN Configuration): Ensure the following 2 assemblies are registered
Plugin Registration Steps: Ensure the following step is Activated
To enable this plugin to generate for other entities, Add a corresponding CREATE plugin step for the entity Using the Plugin Registration Tool. You can see the following article on how to register plugin steps for autonumber solution
You can download the Autonumber Solution from the below download link;
If you have any problems feel free to email me or post a message on the Dynamics CRM Forum https://community.dynamics.com/members/razwan-crmuk