change created on and created by fields RRS feed

  • Question

  • hi,

    Can I change the created on and created by fields programmatically? I think when I try to do it is overwritten by ms CRM 4.0


    Marwa Saleh


    Monday, June 14, 2010 7:10 PM


All replies

  • Hi,

    no  i am afraid, it is not possible, Both these  fields are only readable and not editable, even using API (see the reference below).

    But if u want you can create a new Date Time field and use this e.g. new_createdon

    and create a custom relationship with systemuser entity and name it like this new_createdby. Since these are your custom fields, you can edit them as much and when u like.

    createdby Gets the ID of the user who created the contact.
    createdon Gets the date and time when the contact was created.

    Muhammad Ali Khan
    Monday, June 14, 2010 7:28 PM
  • Yes you can overwrite the createdon by using overriddencreatedon, but I believe it has to be ran as elevated rights to do so.  You can't override the createdby as far as I know.
    Blake Scarlavai - http://mscrmdev.blogspot.com/ - Sonoma Partners - http://www.sonomapartners.com/
    Monday, June 14, 2010 7:53 PM
  • If I'm not mistaken, "overriddencreatedon" becomes utilized primarily by various import processes to identify when the record was actually established in the database. However, I think the behavior is opposite Blake's comments, in that "overriddencreatedon" is overridden by "createdon", rather than the other way around.  As Muhammad indicates, the API will not allow you to Update this attribute.  "createdon" and "createdby" can only be set with the Create process... and I think the engine determines that if "createdon" is supplied, then "overriddencreatedon" contains the actual date the record was created in CRM.  This behavior, I believe, is why the "Created On" field always shows the information that was specified by the "Create" process.

    Dave Berry
    Monday, June 14, 2010 8:27 PM
  • It appears, I'm incorrect.  Validation here:  http://ronaldlemmen.blogspot.com/2008/01/overriddencreatedon.html
    Dave Berry
    Monday, June 14, 2010 8:30 PM