The other side of complexity

Simplicy in Software Design and Code

Duplicate Detection: too much of a good thing.

Posted by Chris Condron on January 1, 2010

I found a defect working on the CRM server today.  We recently added the duplicate detection rules to prevent adding new duplicate records and now every time I change anything on my ACME test account there is a duplicate warning about its subsidiary having the same name (ACME Widgets.) As the intention is to only check when new records are added this is (for our project) a bug.

 The duplicate rules always fire on both create and update, and all of the conditions are OR based so there is no way to filter them out by status or other flags to indicate that this record has been reviewed & should no longer be checked. This gets really annoying when you are updating something completely unrelated and have to click though a duplicate warning again and again.

So to the fix, it is based on two elements 1) CRM allows you to duplicate check against different types of entities. and 2) We are also using a “helper” entity in the creation of our accounts called AccountRequest. (This helper is an entity with 4 or 5 attributes that collects the key information to create an account and then uses a server-side plugin to create the account entity. When the form updates a piece of JavaScript opens the new Account for the user, giving them in effect a wizard to create new accounts. I can post details if people are interested.)

 So what we do is run duplicate detection job between the AccountRequest entity and the Account entity. This will alert the user to potential duplicate new accounts and but will not run when the account is updated.

Problem solved.

We can even extend it with the soundex solution here

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.