简体   繁体   中英

How to programmatically retrieve records imported in Dynamics 365?

I have written a C# console app that pulls data from our legacy system using SQL, converts it to a CSV file, and then loads it into Dynamics 365 using an Import Map stored in the system.

After I load the Accounts and Contacts, I need to import the records for the N:N relationship. To do this, I need to know the IDs for the Accounts and Contacts that I have imported.

If I have the Import.ID of the import I did, is there a way I can query to get the records that were inserted during that import?

When you import data using the UI, you are able to see the list of records created or updated during an import. How do I do that programmatically?

When you import records via the bulk import tool the out-of-box field importsequencenumber should get populated.

Alternatively, you can write some info about the import to an unused field like ftpsiteurl , or create a custom field to contain info about the import.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM