Frode Magnussen
Frode Magnussen

Reputation: 23

Dataverse - Retain statecode and statuscode in a migration process

I am migrating Dataverse activity(email, task, letter, phonecall) records from one environment to another. I use a C# app to copy the records, and a plugin to set createdby, modifiedby, modifiedon and ownerid in pre-operation stage. The copying works fine and these columns have their source values, but I have problems setting the source statecode and statuscode. When copying email records I have statecode 1 Completed and statuscode 3 Sent, but get an error saying 3 is not a valid status code for state code EmailState.Open.

How can I copy the activities correct to a new environment and keep all historic data?

Upvotes: 0

Views: 44

Answers (1)

Frode Magnussen
Frode Magnussen

Reputation: 23

I solved the problem. Setting the statecode and statuscode in the plugin pre-operation with the other attributes solved the problem.

Upvotes: 0

Related Questions