Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Change createdon and createdby when creating Post records?

Posted on by Microsoft Employee

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

  • Suggested answer
    Ben Thompson Profile Picture
    Ben Thompson 6,350 on at
    RE: Change createdon and createdby when creating Post records?

    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.

  • Suggested answer
    Vighnesh Profile Picture
    Vighnesh 1,942 on at
    RE: Change createdon and createdby when creating Post records?

    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.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Change createdon and createdby when creating Post records?

    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.

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Change createdon and createdby when creating Post records?

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans