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 mapping XML: Automatically creating a record if lookup can't find a match

(0) ShareShare
ReportReport
Posted on by

Hi

Just setting up our CRM and building the Data Map XML and in my contact import there is are three possible fields that would hold a link to an account.  Eg:

Name Company* Current University Pre 16 School* Tel Emal
Fred ABC1 12345 111111 fred@blogs.com
Steve DEF1 XYZ 11111 111111 steve@here.com

What I want to do is when the import runs to fields marked * would look up in the Account record and when they find a match link the customer to the company.  However if there is no match, create an account on that name.  So with the above when "Steve" gets imported if there is no Account called XYZ then create one.

My XML for the field:

<AttributeMap>
          <SourceAttributeName>Pre 16 School</SourceAttributeName>
          <TargetAttributeName>kcl_pre16</TargetAttributeName>
          <ProcessCode>Process</ProcessCode>
   <LookupMaps>
      <LookupMap>
       <LookupType>System</LookupType>
       <LookupEntityName>account</LookupEntityName>
       <LookupAttributeName>name</LookupAttributeName>
       <ProcessCode>Process</ProcessCode>
      </LookupMap>
      <LookupMap>
       <LookupType>Source</LookupType>
       <LookupEntityName>ContactImportIKM</LookupEntityName>
       <LookupAttributeName>Pre 16 School</LookupAttributeName>
       <ProcessCode>Process</ProcessCode>
      </LookupMap>
   </LookupMaps>
        </AttributeMap>

At the moment it fails to import if there's no match - any way of adding an account?

Thanks in advance.

Ian

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    I would suggest creating another file of lookup values and importing with 'do not create duplicates' turned on. This way you will only get new rows that are not already in the database and your second import will not fail.

    Hope this helps,

    Scott

  • Community Member Profile Picture
    on at

    Thanks - that seemed to solve it.

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)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans