web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to update Created on field - the system field?

(0) ShareShare
ReportReport
Posted on by 137

Hi,

I am using MS Dynamics 365 version 1612 (8.2.2) on-premises, we know that the "Created On" in most models are system generated field, user can not modify it.

But my client asks to modify it to some back of date for some records, I have done some searches from the internet, it seems it is possible.

I found this video which shows me how to edit it and followed it:

https://www.youtube.com/watch?v=brWeeK1tve0

this is what I did:

1. Created a personal view to list some records I want to update the data of  "Created On" field back to past date (2009-02-10)

2. Export the data to Excel and added new column called: OverriddenCreatedOn (some other posts also mentioned I can call it RecordCreatedOn), and entered date of "2009-02-10" and saved it as excel file to my local machine.

3. Closed the personal view

4. Reopen this personal view, and import the previous excel file, I can see the "OverriddenCreatedOn" is not mapped, I should map it to Created On field, but I can not field the Created On field on the right side.

Can  anybody tell me what is wrong with it? Does this work on the old version of CRM, and it is not working with new version CRM I am using right now?

Thanks a lot,

Peter

I have the same question (0)
  • Peter Cong Profile Picture
    137 on at

    I also found this method for updating Created On field and tried it, but it does not work, there is no duplicated records created.

    docs.microsoft.com/.../the-truth-about-override-created-on-or-created-by-for-records-during-data-import

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    OOB you can only set CreatedOn on create of the record, not during reimport.

    If you want to change CreatedOn/CreatedBy/ModifiedOn/ModifiedBy fields you will have to compose the plugin that will do that for you - missdynamicscrm.blogspot.com/.../crm-2011-2013-modify-createdon-createdby-modifiedon-modifiedby-using-SDK-CSharp.html

  • Peter Cong Profile Picture
    137 on at

    Hi Andrew,

    Thanks a lot for your help, it seems the example was based on CRM 2011/ 2013, buy I am using MS Dynamics 365 version 1612 (8.2.2) on-premises, are you sure that solution is also working on my CRM version (MS Dynamics 365 version 1612 (8.2.2) on-premises) ?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Peter,

    It worked for 2011 and it works now for latest cloud instances so my assumption that it should work for you 8.2 on-premises.

    I missed that you used on-premises so you have an access to SQL DB - I believe it'll be much easier to update data in the database using simple SQL Update - why don't you want to use that approach?

  • Peter Cong Profile Picture
    137 on at

    Hi Andrew, I will ask my DBA to see if it is possible to update it from SQL DB side, I assume it is probably not otherwise my manager won't let me investigate this way.

    But since it is one time change, instead of using Plug ins, I prefer the import and export Excel way, if you search from internet includes the two examples I posted in my original post, it seems that it should work, but I am not sure it is not working for my CRM version. any Idea?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Peter,

    Based on my experience you will not be able to update those fields using import/export excel files.

  • Peter Cong Profile Picture
    137 on at

    Hi Andrew, thanks a lot for your confirmation, I have just verified those example in the online trail version of CRM, it works.

    But it does not work on my on-premise version. And plus your confirmation, so I assume those examples are related to CRM online versions. it will not work on premise version. I will be looking for other ways. I am new in CRM, do you think that I can update the Created On field using work flow by using an extra field to set the date of Created On field? thanks again

  • Peter Cong Profile Picture
    137 on at

    Hi Andrew, I studied the example codes, shouldn't it be update method after changing the createdon field value?

    Just like other framework, each update should have a "save" method, right?

    if (context.InputParameters.Contains("Target") &&

    context.InputParameters["Target"] is Entity)

    {

    // Obtain the target entity from the input parameters.

    Entity entity = (Entity)context.InputParameters["Target"];

    entity["createddon"] = new DateTime(2013, 8, 8);

    //service.update(entity); //something like this line?

    }

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    That is correct for the case when you register your plugin in "Post-operation" mode but in your particular case plugin has to be registered in "Pre-operation" mode, i.e. before the save to DB operation happened already.

  • Peter Cong Profile Picture
    137 on at

    Hi Andrew, thanks a lot again for your help, could you please be more specific to write this plug in? sorry, I am new with CRM and this is my first plug in. for the sample codes I posted, // Obtain the target entity from the input parameters.

    Entity entity = (Entity)context.InputParameters["Target"];

    entity["createddon"] = new DateTime(2013, 8, 8);

    this datatime is hard coded, but I want to get it from user interface UI, for example, there is new field call User_Entered_Date added in the CRM form, if this field is blank, the createdon field will be based on current date, otherwise, the createdon will be based on the User_Entered_Date field, and I think this plug in will be attached with the Create event on Pre-operation event, but I don't know how to get the data from the object of User_Entered_Date, I appreciate if you provide sample codes, much appreciate

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans