binway
binway

Reputation: 88

Azure Data Factory not populating new record into Dynamics 365 Incident table

I am using the Azure Data Factory to migrate data from an on-prem db to Dynamics 365 CE. I have successfully migrated some test data to a couple of tables in Dynamics. I am now attempting to load some sample records for the "required" fields into the incident table which has a polymorphic field. I was getting an error

Dynamics operation failed with error code: -2147220891, error message: Cannot find record to be updated

I thought this was referring to the polymorphic field but that is not the case. I loaded a record using the Dynamics import wizard successfully. Once the record was in then I could successfully run the copy activity in the pipeline to update the record but it will not insert new records. The sink in the copy activity only has upsert as an option and this option worked for the other tables. Is there some setting in the Dynamics table that is only allowing updates or is there some hidden field that also needs to populated to allow an insert of new records and why only this table so far.

Upvotes: 0

Views: 83

Answers (1)

binway
binway

Reputation: 88

The issue was that one of the required fields to be populated was a Choice field. In this field if any of a certain set of values are selected then it triggers a workflow, in this case the workflow was attempting to populate a field in a lookup table but there was no value to update. Hence the error "can't update the record". For the data migration process we will either turn off this workflow or have the value required for this set of choices populated.

Upvotes: 0

Related Questions