I am doing something a little different from previous CRM upgrade projects I have been a part of. The client has a CRM 4.0 organization and a CRM 2011 organization and they are used by two different sets of users. Now they want to upgrade the org to 2011, but they don't just want it upgraded, they want the 4.0 organization merged into the 2011 organization.
This is an interesting scenario and I think I will cover how it goes and the steps required to get there.
Hopefully the story over the next couple months will help someone.
I wanted to write a quick blogpost because I think there are a lot of people out there that have never used the overriddencreatedon field that is on all CRM 2011 entities. If you have ever tried to manipulate the createdon field manually using the CRM sdk you will find that it is basically read-only.
There is a workaround for this though.
If you populate the overriddencreatedon field when you insert your entities you can specify your own datetime for the createdon field. Now when the field is saved the overriddencreatedon field datetime is put in the createdon field of the entity and the REAL createdon field is still saved in the overriddencreatedon field.
So all you have to do is populate the overriddencreatedon field and it will in turn populate the createdon field and the real date will then be saved in the overriddencreatedon field.
There is a limitation to this.
You cannot insert a datetime in the future. This will throw an error. If you are using an application on another server and using datetime.now you might want to also use .addminutes(-5) or something to that effect because if the server times are out of sync by even a little bit and the application server tries to insert a time that is in the future for the CRM server, it will fail.