Hi everyone
I'm working on migration data and I have a problem. I need to migrate post data and need to keep the createdon and createdby the same as old environment. Is anyone know how to do that?
Thanks,
*This post is locked for comments
Hi everyone
I'm working on migration data and I have a problem. I need to migrate post data and need to keep the createdon and createdby the same as old environment. Is anyone know how to do that?
Thanks,
*This post is locked for comments
You can override the createdby and createdon dates of a record via the SDK provided the user account running the import has been given the explicit permission to do so. You can't however do this via bulk import as that follows a very different process..
Counter intuitively the field you need to set the date is the overridencreatedon field which results in the createdon field showing the date you set and the overridencreatedon date showing the date you imported the record
var ent= new Entity("account"); ent["overriddencreatedon"] = new DateTime(2012, 2, 22); ent["name"] = "overriddencreatedon"; service.Create(ent);
Both Scribe and kingswaysoft should be able to do the appropriate mapping for this to work.
Createdby works the same way (you set the overridencreatedby field to the entityreference (within the new migrated instance) of the user account who created the record.
Hi trongtran,
There is no way you can modify these fields as they are controlled by system. You have to build a custom logic to achieve this.
Please refer to this link.
Hi,
I would suggest create separate field to migrate created on date as Created On field is system field which is updating internally. To migrate Created By field you should execute the API request impersonating with the created by user.
Hi You can use tools like SCRIBE for data migration they support this kind of functionality. I have used it in past and its fast & reliable.
If found useful, please mark the answer as verified
Regards,
Pranav
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156