Microsoft CRM 3.0 Bulk Import Wizard


You can use the Microsoft CRM 3.0 Bulk Import Wizard to import bulk data into default and custom attributes of system entities. But, if you want to import custom entities you need to write your own import tool.

This article, and the sample code supplied in the download, shows you how to create your own application that lets you programmatically import data into entities not supported by the Bulk Import Wizard. The article steps you through the process, from building the application to performing and verifying the import.

In addition, the article describes best practices for better performance when using the Microsoft CRM 3.0 SDK.

You’ll find it here on MSDN: Microsoft Dynamics CRM 3.0: Bulk Import.

Inna Agranov

Comments (18)

  1. Tony Pascone says:

    Inna,

    Very helpful. The tool worked well. Thanks!

    Was wondering if you have any other code written or references I can use to import custom entites that have have relationships to other entities and a reference lookup attribute.

    Any help greatly appreciated…

    THanks,

    Tony

  2. Inna,

    Yes, this is a very useful tool. Like Tony, I’m also interested in the scenario where the entities to be imported have relationships to other entities.

    Thanks,

    -Marc

  3. Sergey says:

    Inna, what are required fields for Opportunity Entity Bulk Import? I always getting error during load (fields not matching). This entity has references to our custom entity.

    Thanks for your help

  4. Inna Agranov says:

    Sergey,

    The required attributes (fields) for the opportunity entity are: name and customerid (account or contact). However, you need to follow the requirement specified in the Note below, if you are using the sample code for opportunity bulk import:

    Note: In order for the sample code to run, the Competitors.csv file must specify five Competitor entity attributes.

    So, for the opportunity entity you must specify the name, customerid and three additional attributes.

    Here is the code that shows how to initialize the opportunity entity:

    // Instantiate an opportunity entity.

    opportunity bikes = new opportunity();

    // Set the name property (required).

    bikes.name = "New bike store";

    // Assign an owner for the opportunity.

    bikes.ownerid = new Owner();

    bikes.ownerid.type = EntityName.systemuser.ToString();

    // You must replace this with the GUID of a valid Microsoft CRM user.

    bikes.ownerid.Value =

       new Guid("F4D00C90-89C9-DA11-86AF-000BDB5C46AB");

    // Associate the opportunity with the potential customer.

    bikes.customerid = new Customer();

    // You must replace this with the GUID of a valid customer.

    bikes.customerid.Value =

       new Guid("FD52C7BD-27C1-48A2-8657-0D3FAB00797E");

    // Set the type of the customer.

    bikes.customerid.type = EntityName.account.ToString();

    Thanks,

    Inna

  5. Inna Agranov says:

    Tony, Marc:

    Thank you very much for your feedback. Currently, we don’t have a sample code that demonstrates how to import bulk data for custom entities that have relationship with other entities. However, your input is very valuable and I’ll add your request to our samples/article list.

    Thanks,

    Inna

  6. Caro says:

    Hello, i read the post and i found it very usefull. i am also very much intrested in importing to a custom entity that have relationships with other entities. did anyone find anything?

  7. Paul says:

    I’d just like to add another voice looking for a way to import custom entities with relationships.  

    Thanks,

    Paul

  8. Dating says:

    You can use the Microsoft CRM 3.0 Bulk Import Wizard to import bulk data into default and custom attributes of system entities. But, if you want to import custom entities you need to write your own import tool. This article, and the sample code supplie

  9. Weddings says:

    You can use the Microsoft CRM 3.0 Bulk Import Wizard to import bulk data into default and custom attributes of system entities. But, if you want to import custom entities you need to write your own import tool. This article, and the sample code supplie

  10. Sander says:

    I can;t get the import tool to work.

    I get the following error when i select the competitors.csv file tot test if the tool works:

    "one or more of the fields in the file do not exist for the selected entity"

    I folowed the above instructions exactly, i have adminstrator rights etc.

    Does this have to do with rollup 3? Is the import tool compatible with rollup 3?

    Maybe it has something to do with the fact that i have a dutch version of ms crm? although the database scheme is the same as english version, right?

    Any help will be much appreciated!

    Greetings,

    Sander

  11. Eric says:

    I’m getting a ""one or more of the fields in the file do not exist for the selected entity" error when i select the competitor.csv file tot test the tool.

    I have ms crm in french and rollup 3 installed.

    Maybe it’s incompatible?

    Please help!

  12. Inna Agranov says:

    This blog is monitored by writers and editors who develop content to support Microsoft Dynamics CRM, such as Help, Resource Center articles and SDK documentation. Unfortunately, we cannot provide technical support.

    Please, use one of the following resources to assist you with your questions.

    Thank you.

    Find support in a public newsgroup (free offering)

    Public newsgroups enable partners and customers to solve real-world problems through a peer-to-peer exchange of ideas, experience, and resources. To access a newsgroup, visit Microsoft Business Solutions CRM Newsgroups and enter your question there.

    Choose a support plan

    Service offerings may vary by country. If you are located in the United States or Canada, learn more about available service plans. For customers outside the United States and Canada, please visit the Microsoft Business Solutions worldwide locations page. Or contact your local channel partner for more information about available service options.

    Access customer support

    If you are in the United States or Canada, and you have a Microsoft service plan, visit CustomerSource to access e-Support. Enter your user name and password. Or call (888) 477-7877 for telephone support, and enter your authorization number.

    If your Microsoft Business Solutions service plan has lapsed, contact your local channel partner for support assistance. Microsoft Dynamics CRM customers worldwide have the option to acquire per-incident support from Microsoft. Call (888) 477-7877 in the United States and Canada. Or call the local support number for your country to acquire per-incident support.

    If you are enrolled in Microsoft Services Premier Support or Microsoft Services Essential Support, call (800) 936-3500 in the United States or Canada. Or call the local support number for your country.

    You can also choose to directly work with a channel partner who understands the unique service needs of their business

    Find support for partners

    If you are a Microsoft partner with a Microsoft Business Solutions competency, visit PartnerSource and enter your user name and password to submit an electronic support request. Or call (888) 477-7877 in the United States or Canada, and enter your authorization number. Or call the local support number for your country.

    If you are enrolled in the Microsoft Partner Program, you may have Professional Support Incidents as a benefit. To see if you have incidents available that can be used for Microsoft Dynamics technical support, visit the Online Assisted Support Options page.

  13. Sander says:

    Not quite the reaction i was expecting…

    Why did you help before then Inna?

    Anyway i solved my problem. And since i do like to help people out, here is why i got my

    "one or more of the fields in the file do not exist for the selected entity" error:

    When you want to succesfully import a csv file into the bulkimport tool..DO NOT USE COMMA’s to seperate the values in your csv. That generated my error.

    You should use the ";" character to seperate the values in the csv. So the information on the msdn page of bulkimport is not right about this and also the competitors.csv supplied with the bulkimport tool has the wrong format (comma-seperated)…

    Great tool. Too bad i have spend so much time on this… it would have saved me a lot of time if the supplied csv file was in the right format (sloppy by the way) and the information on msdn was correct about the format to use for csv…

  14. Inna Agranov says:

    Thank you very much for providing a valuable feedback.

  15. Mark says:

    Hi Everyone,

    I just wanted to let you know that I have a version of this tool that allows importation directly from a database. This means you can import data with out having to use the CSV file as an intermediate step.

    email me at markATbiztorque.net if you’re interested in this real time saver.

    Mark

  16. Kevin says:

    I'm getting the same error ("one or more fields …".  I tried the semi-colon instead of the comma's, and still get it.

    I have a few GUID's in my import file, should they have quote around them (single or double?)?  I just have them there on their own.

    I'm trying to import into new Cases … the Case entity (Incident) has two tables, an IncidentBase and IncidentExtensionBase.  Because they are new cases, I'm including GUID's that identify the Contact.

    I'm at the point where I just want to add them through SQL Server, though I'm sure someone will tell me what great horrors await if I did it that way.

Skip to main content