So recently I recieved a query that importing cases record with Completed status wasnt working using OOB import. This was for data migration and its pretty common to migrated closed cases for historic purposes.
So D365 does allow importing inactive record for certain entity – like account.
Below is an example of sample :
If you see the Audit however, you can see that it is a two step process – where record gets created in active stage and then gets deactivated.
Lets consider incident entity now. To reoslve a case from UI, you need to fill these details. This in turn creates a case resolution entity record which then closes the cases. So to reoslve a case we need to import Case Resolution entity.
Please note that cases can be imported in cancelled state directly – it is only the resolve status that isn’t allowed to be imported directly.
When we to import below file, the same behaviour isn’t repeated:
However, the import partially succeed with proper error message:
To resolve the imported cases, we need to import similar file to this entity. What is will do is create a similar file in below format and import it.
D365 does NOT provide a template for Case Resolution so you need to import it as a CSV.
This will then resolve the two cases Incident 8 and Incident 11. You can add any other requirted field like Actual End Date – all those will work fine.
Please note that Dynamics is not considering the status reason field while importing and it just takes the default status reason field for given status.