The error "Cannot find record to be updated" (error code -2147220891) suggests that the Upsert
operation is failing because Dataverse cannot locate an existing record to update. This typically happens when the key field mapping is incorrect or Dataverse does not recognize the record as existing.
Possible Causes & Fixes -
Check Key Column Mapping in ADF Copy Activity - Go to Sink settings in your Copy Activity. Ensure that the correct Primary Key or Alternate Key is selected for the Upsert
operation. If using an Alternate Key, make sure it is already defined in Dataverse.
Verify Alternate Key in Dataverse - In Power Apps, navigate to Tables → Your Dataverse Entity → Keys. If an Alternate Key (e.g., unique business ID, email) is missing, define it and try again.
Ensure Matching Data Types - The key column in SQL Server and Dataverse must have compatible data types. If SQL Server uses nvarchar
but Dataverse expects a GUID
, the Upsert may fail.
Test with an Insert Operation - Temporarily change the Write Behavior in ADF from Upsert
to Insert
and run the pipeline. If it inserts successfully, then the issue is with the Upsert
key detection.
Consider Using OData v4 Linked Service - If the issue persists, try switching from Dataverse (Common Data Service for Apps) to OData v4 linked service, as it sometimes handles Upsert
more reliably.
For further details, please refer:
Please refer to MS Q&A thread - https://learn.microsoft.com/en-us/answers/questions/1643446/data-factory-copy-data-activity-cant-find-record-t addressing similar issue.
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.