Is there some additional logic performed by Associate() operation?
I want to programmatically copy a lot of data from one Dynamics CRM instance to another one. And I suppose it would be simpler to make plain copies of rows (starting from the root objects in order to avoid breaking constraints).
And furthermore, is it possible to clone systemuser and business units instances (rows), too?
Thank you in advance!
PS: by cloning a row (using OrganizationServiceProxy), I mean:
- fetch all attributes of a row (from Dynamics CRM 1)
- e = new entity(), set all attributes (including id), then service.create(e) (on Dynamics CRM 2)
Associate can be used to clean up in the end, but your order of entities will be what you want to first layout.
So for example, you will want to copy Accounts before Contacts. But then, on the Account you may have a primary contact that you will need to go back and Associate. This is no different than going back and updating the account record with the lookup value (post contacts being inserted).
I would also suggest looking at programmatically exporting the base unmanaged solution and then importing it if need be.