3
votes

While importing csv data in dynamics 2011 online, is there any option of updating existing entities instead of creating new ones ?

For example, I have certain custom fields on the Lead Entity (each lead is identified uniquely by email). At some point, an attribute of a lead changes.

Can this new value be imported via csv, also maintaining the other existing lead attributes ?

Thanks.

3

3 Answers

4
votes

What you can do is get Dynamics to provide you with an xml file of your data which you can edit and re-import with changes.

  • Open advanced find and locate the record you want to change some values of
  • Add the appropiate columns you want to edit
  • Click "Export" in the ribbon
  • Check the box "Make this data available for re-importing..." and click Export

Now you are free to edit your records(s) in an xml file (Excel works nicely) which you can update and then import as standard via Data Management > Imports > Import Data.

2
votes

Spencerooni's answer is correct so far as native support for what you're asking (edit: and as far as IE9 can take you). To handle external CSVs via the CRM client, though, you will have to do the reading of the CSV and the updating yourself. I can think of one way to do this:

  1. Create a section in your site map devoted specifically to CSV imports from this third party source, or if you're feeling adventurous, devoted to all generic CSV imports.
  2. Create a web resource where you prompt the user to select a file on the client machine. To get started on this, you can reference the SO answer "The future is here!".
  3. Read the selected file(s) via the HTML5 File object and process the updates to your Leads via JScript CRM calls. To process the updates via C#/VB.NET, you can reference the SO question "Call C# Code from Ribbon JScript CRM Online 2011" and its accepted answer.
  4. Point the sitemap to reference your web resource, and that should just about do it.

Edit: Forgot to add that to handle any of this, you'll need to upgrade to the IE10 Preview(!). Or wait until CRM 2011 gets multi-browser support. Whichever comes first.

0
votes

You might want to take a look at this article, which explains how to use CRM's OrganizationService from Powershell to do the updating for you based on a .CSV file (by the looks of it, it should apply to CRM2011 as well):

MS CRM 2015: Bulk update data using Powershell