When importing data into Dynamics CRM using SSIS, you also need to import your Created on/by and Modified on/by data. Previously, you could only import CreateOn fields by mapping the “overriddencreatedon” field with source data. We now have at least two supported options to update these fields, and in today’s blog, we will show you how to use both. Let’s dive in!
Using a SDK/Plugin
By using the SDK/Plugin option, you need to store your values in custom fields during the import process and then run a plugin to utilize the values.
During the import process, store CreatedBy, ModifiedBy, and ModifiedOn values in custom fields. Then, you will need to write a plugin to update these three fields after the data is imported. The plugin should be written to capture data from these custom fields and update the out-of-the-box fields.
Here is some sample code syntax you can use to update these three fields:
TargetEntity[“modifiedby“] = new
TargetEntity[“modifiedon“] = new
One of the biggest disadvantages with this approach is the development time, as you will need to write plugins for each entity that you want to store this information. Additionally, make sure you remember to delete the plugins after the migration is completed and delete the custom fields that you used to store the data temporarily.
Using a SSIS Tool Kit
Another option is to use the KingswaySoft SSIS toolkit. By using a 5.0 version or later, it’s possible to update CreatedBy and ModifiedBy fields in a simpler fashion. Please note that this option will not let you update ModifiedOn fields.
If you would like more information about this option, you can check out the article here.
That’s all for the blog today! Make sure you sign up to receive our blog updates delivered directly to your inbox.