Creating readable unique identifiers for your CRM records

A common requirement in CRM implementations is the need to have readable identification numbers auto-generated for custom attributes. There are various ways of achieving this. This article provides a few options to do that.  

Let’s use one scenario as a context. Let’s say we are building a Grants Management application and we are tracking scholarship applications in Dynamics CRM. We have an application entity which contains an Application Id field. For business reasons, we need to have a unique identifier to refer to the applications. What are out options? For starters, let’s look at some of the elements to consider when looking for an auto-numbering solution in Dynamics CRM?

  • Are you using an entity that is auto-number enabled? (e.g. Case, Quotes, Orders etc.)
  • Do you need the numbers to be sequential?
  • Do you have potential race conditions? (i.e. can the event assigning the auto-number be triggered by multiple processes simultaneously?)
  • Do the auto-numbers need to be human readable?
  • What is the format required? (numeric only, alpha-numeric, letters only, prefix, suffix etc.)
  • Can you and/or do you want to write code to generate these numbers or do you want an simple configurable solution?

Generate an unique number based on the current Date Time

Of course, this required a plugin on an event that will generate the application Id. From a technical standpoint, there are a few algorithms out there that will give you an indication as to how this can be done. The full date time and the “tick” should be use to generate the number to ensure uniqueness. But even with that, there is a very very very small chance of having race conditions depending on your application and on your (bad) luck. Also, this will not allow your to use sequential numbers.

Create a record of an auto-numbering CRM entity

If you are *not* using one of the CRM auto-numbering enabled entities (for example, Campaign), this solution is have a plugin (or a Workflow) on your triggering event that will create a Campaign record. This campaign will automatically be assigned a unique number based on your CRM configuration (image below). You can re-use that number as the unique ID for your record and delete the Campaign record that was created. While this is a simple method that can be implemented without coding, the numbers are not really sequential, “garbage” records are created at a cost (create/delete transactions time, what happens if you want/need to use that entity in the future?..). To be honest, it feels like a quick-and-dirty way of doing things, but it works.

The advantage here is that because the auto-numbers are platform generated, so you do not have to worry about race conditions in theory.

Use a model based on CRM Synchronous Workflow + Custom Auto-Number entity

I will not go too much into details about this one. There are lots of articles on the topic. A few “how-to” articles for reference:

Bottom line, this is a great solution if you cannot write any code and don’t want to spend any money for something that should be standard in the platform (yes, I’m ranting, can’t help it). That being said, it you have race conditions, I’m sure you can have a few duplicated numbers with this solution.

Using a 3rd Party Tool

There are plenty of options out there. Some are more flexible than others. Some explicitly guarantee uniqueness, some don’t really mention it. Some are free, some are not.

These are just a few, a research will allow you find more of these and decide the one that fits your needs the best.

Build your own solution

At this point, you can do it anyway you want.

  • If you have access to an external database, a CRM plugin that create a record in the database with an identity column will guarantee to always have unique and sequential numbers. This comes at a cost obviously (external database dependency, speed)
  • There is also a smart way of doing robust auto-numbering suggested by Ken Heiman of Green Beacon here. Good read, smart idea.
  • Some enterprises already have Auto-Numbering web services, you can simply consume that web service from a CRM plugin as well (same cost as database, dependency, speed)
  • I have also seen the idea of using the Guid as a unique identifier, by copying the value into a text field with a plugin. I don’t think it’s readable, but definitely unique.


It had been too long. Happy CRM’ing ! 

Dynamics CRM and Address Validation

Last year I was involved in a couple of CRM projects for which we had heavy requirements for address validation. The main scenarios that we encountered are the following:

  • All existing addresses must be validated and/or corrected (existing records)
  • New addresses saved in the system should be validated and/or corrected (synchronous validation)
  • When an address is entered, there should be an auto-complete functionality to help users enter the correct address

That was content for great research. First I want to share some facts about what you usually get with address validation solutions and then I will talk about the different solutions we used for the scenarios mentioned above.

About Address Validation Tools

An address validation solution is a tool that helps make sure an address is valid according to a standard (post service, government, other). It does so by taking an address as input, parsing it, comparing it to addresses in a proprietary database using match algorithms and returning a corrected/validated when it is found. There are plenty of address validation tools out there. Most of them have some common points.

First, they are sold as web services (cloud based or on premise) or as local APIs (.NET Libraries). If you are going with a local installation, it usually includes one or more address databases along with a web service. That means you will require little space on a server to install your address validation tool. Most vendors also offer a batch address validation/correction module.

Second, most of them function the same way: you send an address as an input and you get the validated/corrected address as an output. When an address is corrected, you get the changes that have been made (e.g. postal code changed, street type added etc.). In the same logic, when an address is not validated, you also get a validation status and sometimes a reason why the address is not validated. The batch processes usually provide a way to upload an address spreadsheet and get an output spreadsheet with the validation results.

Lastly, the pricing models are similar. You get can buy a certain amount of transactions (monthly, yearly or other). The price will vary based on the set of tools selected.

Obviously, there are other things to take into account. Some vendors only offer validation for specific countries and regions, some provide more than just address validation, for example address standardization, geocoding, multi-language support and more.

  • Correcting Existing Addresses

There are many ways to tackle this. The easier way is to use the validator’s batch processing module. When using Dynamics CRM, you can easily export your address using the “Export to re-import” functionality as shown here. Once you have your spreadsheet, you can easily import it to your address validation tool and get the corrected rows back into your CRM. There are two issues with this approach:

  • There is the 10000 records limit when you export data to Excel spreadsheets. If you have more rows to correct, then you need to consider an alternative solution
  • When an address is sent for validation, you may want to indicate a validation status in CRM which you can’t do by simply reimporting the corrected rows

In our case, we decided to write an application that reads all the rows for which we need to validate an address. For each row, a web service call is made to the address validation service provider, once we get the result, we store the corrected address as well as the correction details. When an address is not corrected, we store the details (if available) and we send the record through a manual processing for someone to perform the validation manually.

  • Address must be validated when saved to CRM

If you are adding this feature when building your system (before there is any address in your CRM), then you should never need the logic described in the point above.

The design here is very simple:

  1. Create a plugin on the address save or update (could be a custom entity or OOB such as Account or Contact)
  2. The plugin calls the address validation web service
  3. The plugin handles the business logic that is executed post validation (e.g. overwrite input address or creates a manual validation activity/task linked to the address being processed

Keep in mind that in point b, we call an external web service. This design works well for on premise installations. For CRM Online, you may not be able to reach those external web services if there are not hosted in Azure.

  • Address Auto-Complete Feature

For this client request, my colleague had experience with a CRM Add-On that does just that. It is called PostCodeAnywhere. It is a light weight solution for CRM (it only contains a few web resources). Here are a few screenshots.

It is worth noting that they support a lot of different countries so it makes it a very handy tool if you work for a company that stores international addresses. You can configure it to work on OOB address fields as well as custom fields.

I will also mention that using this tool is great to help system users entering correct addresses. However, there is no way to know (from an auditing perspective) that an address was entered using the add-on. Anyone could overwrite it manually.

A few tools

Here are some of the tools that we tried, used and/or tested for address validation:

  • Service Object : Great overall experience. The product is very good and the support and sales team are very responsive, efficient and flexible. They offer validation web services for US and Canada only.
  • Melissa Data : The product list is impressive (on prem, hosted web services, SSIS integrated tools etc.). They offer a global address validation web service.
  • nCode : The product has a lot of search algorithms for address validation. It comes as an on premise web service installation. It only support Canadian addresses.

The Google MAP and Bing APIs are also worth taking a look at.

Have fun!

EditAble CRM Grid by AbleBridge

I recently spent some time trying out the AbleBridge EditAble CRM Grid for Microsoft Dynamics CRM 2013. In this article, I’m providing an overview of the product that can help you make an informed decision if you are looking for a rich data grid experience for your Dynamics CRM implementation.


AbleBridge EditAble CRM Grid can be installed in CRM Online and On Premise. There are two main steps to install the add-on.

  1. CRM Solutions

    There are 2 CRM solution files to import (Core & Data Grid) to your organization.

  2. License Configuration

    Once the solution files have been imported, a license XML file must be generated by AbleBridge. It contains a key that’s tied to your organization and customer, it also brings in information such as user count and expiration date.

Solutions Components

The solutions files (Core & Data Grid) are very small (less than 1.5 MB combined) and they import very quickly, showing how lightweight the add-on is.

The Data Grid solution contains around 150 components, mostly web resources (images, javascript and HTML), some plugin steps and a few CRM entities. As you can see in the screenshot in the previous section, the configuration screen is HTML/JavaScript based, not Silverlight as we’re accustomed to see with CRM add-ons. The entire solution is actually HTML/JavaScript based, there is not a single trace of Silverlight in the solution which personally makes me very happy J.

EditAble CRM Grid Configuration

After the solutions have been imported, you can navigate to the Settings àAbleBridge Data Grid list view to take a look at the existing EditAble CRM Grids or create new ones.

To create a new EditAble CRM grid, create a new Data Grid Configuration record. Doing so will take you to a wizard that will guide you through the configuration steps of your view. The basic steps are

  • Grid basic configuration information
    • Grid name
    • Entity to show in the grid
    • Grid “mode” (Editable or Read Only)
  • Columns Selection & Configuration

  • Record Selection setup: select whether you want records to be shown based on a specific filter (entity list view) or related to a parent record (child entity sub-grids)

Notice that at step 2 above (add and configure columns), we do not get the option to add columns from related entities. When using the AbleBridge EditAble CRM Grid, you can get the same behaviour by configuring a custom field in the grid (not described in this article). I am told it will have more native support in a future release.

Once you have gone through the basic grid configuration wizard, you are presented with the Grid configuration record itself. It presents many more options to configure the grid. Let’s review some of the options. We’ll go through most sections of the configuration record so you can see all available config options.

Ribbon Buttons

As you can see in the image above, a few buttons have been defined and provide with the ability to

  • Refresh Grid Definition: this will take you back to the configuration wizard I talked about earlier to redefine your grid’s basic configuration
  • Publish Grid Configuration: same concept as CRM customization, a Grid Configuration needs to be published for users to see its latest configuration
  • Preview: you can preview a grid layout and functionality. This is a nice feature to allow you to make sure that your configuration is correct before publishing it.
  • Copy: used to copy a grid configuration

General Section

The available options for the general section are the row functionalities and the display options.

Grouping Section

I particularly like this feature. It can be viewed as an alternative to the out of the box dashboards that are not available with the grid. Plus if users are used to the “Group By” functionality in Excel, this gives them a very similar type of experience.

Columns Detailed Configuration

For each column, you can set additional details such as their visibility, read only, alignment and enable grouping. You can also change the column order.

Additional Options

There are more options available. I wanted to point out two options in particular

  1. Filters: like a regular CRM view, you can select filter criteria that will be applied to the EditAble CRM Grid
  2. Custom Events: you can write code using AbleBridge EditAble CRM Grid custom API. Your code can fire at different type of events (grid events, column events or toolbar button – yes you can create your own toolbar button for a grid)

Viewing the Grid

The views are web resources. They can be configured to be visible in the sitemap or as sub-grids. Below are a few examples of grid configuration.

Quick Recap

The AbleBridge EditAble CRM Grid is a very good add-on for Microsoft Dynamics CRM. Being able to edit grids inline is a feature that’s been missing in CRM for a long time and as consultant, we very often get ask to inline editing feature. AbleBridge brings that, and more.

User Interface

The user interface is good looking and light weight, all JavaScript and HTML based. The grid themselves look like OOB CRM grids and the configuration is straight forward.

Feature Set

The feature set is very rich, enabling for deep customization of the grid. A few examples are columns sizing, ordering and visibility, grouping, export to Excel. The grid respects the CRM security (security roles, teams, FLS). AbleBridge also provide the ability to write code that can be executed on various events such as grid load, refresh, column change, toolbar button clicked.

The grid currently supports four languages (English, Danish, French and German) and more can be added upon need/request.

Unfortunately, with the grid we lose the ability to have the charts displayed with the view and everything that comes with it. But grouping and calculated fields (sums, counts) are a good alternative for summarizing and filtering data. The other thing that bothered me is not having the possibility to easily add columns from related entities which is a set back from the OOB views. Finally, we faced some issues with users running IE8, we didn’t spend time fixing it and moved them to a different version. It would be interesting to know if there is an easy fix or if IE8 is not really supported.

AbleBridge EditAble CRM Grid offers the classic two license models:

  • Monthly Subscription option (pay a monthly price per CRM org based on the number of users)
  • License Purchase option (one-time fee based on the number of users)

In addition to that, you can pay for annual maintenance which covers compatibility with supported version of Microsoft Dynamics CRM (only applies to license purchase option, included in monthly subscription model).

AbleBridge’s grid is one of the most expensive editable grid add-on for CRM in the market. I think a lot of it has to do with that fact that they came out with a zero-Silverlight based product from the beginning, understanding HTML5/JavaScript is the future (or present and future). They also offer a very rich set of features that I haven’t see in competitors’ products.

Hope this helps!