locked
Relationship between 2 entities. RRS feed

  • Question

  • I am importing data into an entity. There is a field called Contact which is a lookup to a Contact Entity.

    Each record in the data has a value in the Contact field.

    I want to ensure when I import the data that the correct value for Contact is in each record after the import.

    Anyone know how I can achieve this?

    Thanks.

    Friday, July 27, 2012 11:14 AM

Answers

  • Assuming that you are using the native import mechanism for flat files?  If so, you can map the lookup using the mapping UI.  When you click on the Import Data button it asks for your source file, click next.  After validating the file format and the default mapping template, you will be presented with a screen to map your fields.  For the Contact field, click the icon next to the field indicating that it is a lookup.  You will then see a list of fields that shows what data IN CRM that it is trying to match to the mapped column IN YOUR SOURCE FILE.  When it finds a match, CRM returns the correct ContactId and creates the relationship.   That should do the trick.
    Friday, July 27, 2012 12:24 PM
  • Yes you can do that using data import. When you map the contact lookup field to the contact entity, use some unique field otherwise the duplicate contact names can cause problem.

    Have a look at this

    http://msdn.microsoft.com/en-us/library/ms155391.aspx

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Friday, July 27, 2012 1:52 PM

All replies

  • Assuming that you are using the native import mechanism for flat files?  If so, you can map the lookup using the mapping UI.  When you click on the Import Data button it asks for your source file, click next.  After validating the file format and the default mapping template, you will be presented with a screen to map your fields.  For the Contact field, click the icon next to the field indicating that it is a lookup.  You will then see a list of fields that shows what data IN CRM that it is trying to match to the mapped column IN YOUR SOURCE FILE.  When it finds a match, CRM returns the correct ContactId and creates the relationship.   That should do the trick.
    Friday, July 27, 2012 12:24 PM
  • Yes you can do that using data import. When you map the contact lookup field to the contact entity, use some unique field otherwise the duplicate contact names can cause problem.

    Have a look at this

    http://msdn.microsoft.com/en-us/library/ms155391.aspx

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Friday, July 27, 2012 1:52 PM