Hubert Solecki
Hubert Solecki

Reputation: 2771

Dynamics CRM - Add companies that not exists when importing contacts

I'm migrating a customer CRM database to Dynamics CRM. It's about accounts, contacts, and activities. Unfortunately, the previous CRM was not really well used so the data are a bit confused: While creating a contact, you have a field "Company" that is a "look up" field as we can find in Dynamics. But, if you write something in there and you don't look up for the company entity, the value entered becomes just a value of the field "COMPANY" in the "CONTACT" record. That's why I have some contacts that are not really associated with companies.

In Dynamics, I'm using the Import Wizard to imports those entities. Is there a way to add the contact's company if it not already exists while importing contacts?

Upvotes: 0

Views: 136

Answers (1)

jcjr
jcjr

Reputation: 1503

You need to handle this during the Create – by a plugin with a step, or by a workflow. Both works similarly to DB trigger. Plugin is basically .dll written in C#, running in a sandbox, using some of MS libraries. It is registered by external utility. Workflow is something you can do without programming right in the CRM UI. It is easier do deploy, but it has less possibilities. You can find enough information about both online.

I would recommend following process:

  1. Create temporary custom text field on a Contact entity to store account name as a text.
  2. Before the import, in the import file, create a copy of account column with another name.
  3. One account column should be linked to account lookup (parent customer). This is for automatic joining contact and account. The other column is linked to the created field.
  4. Your routine (workflow or plugin) to process this will have following condition to proceed: If account lookup is empty. Then you will create a new account by using information from Contact (mainly account name) and then associate the account and contact (update of the contact record). Optionally erase account text field on the Contact.
  5. At the end, you should deactivate or remove the routine. If you’d use it more often, you need some condition to recognize records are created by import.

Upvotes: 0

Related Questions