Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

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

Posted on by Microsoft Employee

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

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Data import - Mapping to multiple columns of a lookup field.

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

    dynamicscrmgirl.wordpress.com/.../

  • Learn@mscrm Profile Picture
    Learn@mscrm 50 on at
    RE: Data import - Mapping to multiple columns of a lookup field.

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Data import - Mapping to multiple columns of a lookup field.

    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

  • urvi Profile Picture
    urvi on at
    RE: Data import - Mapping to multiple columns of a lookup field.

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Data import - Mapping to multiple columns of a lookup field.

    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?

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Data import - Mapping to multiple columns of a lookup field.

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans