views:

36

answers:

2

I've inherited an implementation of MS CRM 3.0 where individual contacts are each assigned to a particular "distributor." Unfortunately, distributors are not defined as any sort of entity. Instead, the contact form was modified to include extra fields that contain the distributor name and address.

Up till now, each time the distributor address changed, or the zip-code based regions for the distributors were modified, an external custom app and database pulled and modified every contact to reflect these changes.

I'm completely new to MS CRM, and I'm interested to hear if anyone has ideas that would allow me to add Distributors in such a way that their name/address can be modified from within the CRM in one place, and that can be linked to individual contacts.

Ideas?

+1  A: 

Unfortunately the only way to undo that mess would involve a large undertaking of data cleanup and migration. I would try to use the existing account entity and simply place a "type" field to mark it as a distributor. You get a lot of great out of the box functionality by doing so.

Whichever option you choose, whether it's the out of the box entity or a new one, you'll need to use a data migration package such as Scribe or DTS for SQL to move the data from the contacts to their new entity.

Focus
If I create a distributor as an "Account" marked as a distributor "type" can I then link each appropriate contact to that account?
Traples
Yes. In the future if/when they upgrade to 4.0 you can create a new many-to-many relationship between contacts and accounts and call that distributors. In this way the relationship between an account and contact isn't as tightly linked and there's a more defined distinction between a contact's parent account and their distributor account.
Focus
+1  A: 

To be honest, I don't think it would be a ton of code to unmuck this situation. I'll pseudo code if for you to give you the basic idea - I think in the long run this might end up being the best long term solution.

First create a Distributor custom entity. Create a relationship between contacts/accounts as appropriate. Then take the pseudo code below - fill in the stuff specific to your situation. Run it. Then you can remove those unnecessary properties and you should be good to go.

CRmService s = GetMyService();
BusinessEntityCollection objects_to_clean = s.RetrieveMultiple(...some query to get them all...);

foreach (BusinessEntity be in objects_to_clean.BusinessEntities)
{
   DistributorEntity de = new DistributorEntity;
     //set all necessary fields here... 
     de.field = be.field;
     Guid distributorguid = s.Create(de);
     be.distributorid =  distributorguid ;
     s.Update(be);
}
brendan