web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Data import - Mapping to multiple columns of a lookup field.

(0) ShareShare
ReportReport
Posted on by

Hi

I need to set up a data map for importing for a particular type of case records in Dynamic CRM Online 2016.
Case entity have a Lookup field named Counsel.


The Counsel Entity's primary key is a Guid - Counsel ID (which cannot be used for data import).
Counsel have Counsel name and Country column whose Combination is unique (i.e. Counsel Name can repeat , Country name can also repeat, but combination of both makes a unique record and cannot repeat.)


Client provided data sheet that contains Counsel name and Country name as separate columns (as expected). Mapping has been done for source Counsel Name to Destination entity counsel name. But while importing it fails with a message "A duplicate lookup reference was found." (Because it contains duplicate Counsel Names with different country).

The option, I have is to create another column with combination of the Name-Country (auto generate using java script while creating records and keep it hidden ) and ask the client to include a column with same format and map it to the Name-Country column in entity lookup and then Import.

Is there a better solution to this problem ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    You can use alternate key. It would help to resolve this issue.

    Counsel name and Country as alternate keys

    Please refer this:

    www.powerobjects.com/.../utilizing-alternate-keys-in-dynamics-crm-integrations

  • Community Member Profile Picture
    on at

    Thank you Gopalan for your suggestion.

    In my case, I am importing to case entity and Counsel is an Look up field. As you said, if I make Counsel Name and Country as Alternate keys in Counsel Entity, while mapping which field should I map to ? Even if I select both Counsel Name and Country of lookup field, how country  which is another column in data sheet , will get mapped to Counsel Country?

  • urvi Profile Picture
    on at

    Have you resovled this issue? I am also facing the same. Can you please guide on this

  • Community Member Profile Picture
    on at

    Hi Urvi,

    Sorry to come back late.  

    I end up adding a new column which is the combination of counselName - Country ( Type - Single Line text and Field Type : calculated field) in look up field entity. In data sheet , provided a new column with same name (counselName - Country) and using Excels formula + drag option , filled the data manually.

    Data map file modified to accomodate this field. while importing, mapped new field and ignore the Lookup field.

    I feel this is not a good solution, but worked for me .I couldnt find any better option yet.

    Hope it helps.

    Thanks

    Sathyan

  • Learn@mscrm Profile Picture
    50 on at

    Hi Satyan, I followed using combination field.  Can you please tell how to map combination field

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    You should be able to map the non-primary field while importing like explained in this blog.

    dynamicscrmgirl.wordpress.com/.../

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans