Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Import to update CRM records using Contact.contactid

Posted on by 1,575

Hello,

I have isolated contact records which I need to update in CRM. Because CRM Views are so limited I had to isolate these records via an SQL query on the Filtered Views. This has given me the contactid of the records I wish to update.

My question is, how can I use this id to do an update/import back in to CRM?

Any help greatly appreciated!

Thanks,

- Seamus

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Import to update CRM records using Contact.contactid

    nwest88 What exactly do you mean? Do you want to generate the checksum yourself in some way? Why would you do that? When you reimport the checksum / hash is used to check if that row has been modified in the file so it can ignore unmodified rows so they don't get an updated "Modified on" date when they have not in fact changed. This also means your import should be quicker if you only change a small portion of the dataset for example.

  • nwest88 Profile Picture
    nwest88 21 on at
    RE: Import to update CRM records using Contact.contactid

    Is there a way to get the "Checksum" value that gets added to files that are exported with the "Make available for re-import" check box checked?

  • Seamus Profile Picture
    Seamus 1,575 on at
    RE: Import to update CRM records using Contact.contactid

    Thanks Adam. I feared those were the only ways. It seems ridiculously long-winded when you have what I presume should be a unique identifier (contactid) but you can't use it to update existing contact records (not easily, anyway).

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Import to update CRM records using Contact.contactid

    2 possibilities I can think of, without code:

    1) Indirect import.

    Create a custom entity called ContactUpdate. Add fields to hold the data you need, making sure to match field data types, length etc to Contact entity fields. Add a 1:N relationship from Contact to the new entity, which will therefore have a lookup to Contact

    Write a simple workflow triggered on create of a ContactUpdate record that copies the data from the new fields up to the parent contact record.

    Import your changes into the ContactUpdate entity, use the ContactID field in your import to map the lookup to Contact (instead of name).

    Once built, this is easy to repeat in future.

    2) Export ALL Contacts and make available for reimport, including all columns that you want to be able to update. You don't have to do a complex query, just include them all (or do this in sensible batches based on a field that is helpful such as country, or owner, or industry of parent Account).

    Use one of several lookup functions in Excel (eg VLOOKUP) to match ContactID against your list of new data and fetch new values (do this in empty columns to the right of your exported data). make sure unmatched IDs in the export list show blanks, not errors (use IFERROR function to do this, for example). Copy and paste special > Values + Skip Blanks over the top of the exported data.

    When you import, any rows that are unchanged are simply ignored by the import process. It uses checksums in the spreadsheet to do this, which is why you need to make sure those rows are untouched. You should see the number of rows being imported matches the number of changed rows, the rest are simply dropped.

    Alternatively, use lookups to identify rows that need changes, and delete all other rows from the exported file before reimporting.

  • Seamus Profile Picture
    Seamus 1,575 on at
    RE: Import to update CRM records using Contact.contactid

    Thanks for your suggestion - I understand the concept of CRM views and making the data available for reimport, but the Filter criteria (spanning more than 2 entities) I require means that I cannot do the view in CRM. That is why I need to use SQL and Filtered Views - to do a "NOT IN" query.

  • Jani Paavolainen Profile Picture
    Jani Paavolainen 50 on at
    RE: Import to update CRM records using Contact.contactid

    Seamus,

    You do get ID with export to excel,Just check make this data available for re-import.

    If all contacts are some what doable,  take a list with update columns and clear in excel by removing others.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans