0

I am uploading files to SalesForce from a legacy system, and what to retain the original file creation date.

On the ContentVersion none of the date fields are writable, is there an obvious work around I am missing?

  • 1
    You need to enable "Enable Set Audit Fields upon Record Creation and Update Records with Inactive Owners" User Permissions" permission from Setup-->Customize-->User Interface. This will allow you to set Created Date on a record. Also you need to give following permission to a user who is loading those data "Set audit fields, such as Created By and Last Modified By, when you create a record (API only)." – Devendra Sep 16 '16 at 11:55
  • 1
    @Devendra please create an answer so the question can be marked closed if the asked agrees (and you gain some rep as a reward for spending your time). You can always improve your answer later on if necessary. – Guy Clairbois Sep 16 '16 at 13:30
  • @Devendra is this the same as the last modified date, as this is what is displayed in the Files related list on an object. – developer__c Sep 16 '16 at 15:05
  • @developer__c Yes, you can set the LastModifiedDate too while loading a data. – Devendra Sep 16 '16 at 16:10
0

Check Set audit field values for imported records

Step 1: You need to enable "Enable Set Audit Fields upon Record Creation and Update Records with Inactive Owners" User Permissions" permission from Setup-->Customize-->User Interface. This will allow you to set Created Date on a record.

Step 2: Also you need to give following permission to a user who is loading those data "Set audit fields, such as Created By and Last Modified By, when you create a record (API only)."

If you have custom profile then you can edit the Profile to enable above setting, else you can create a Permission Set to include this permission and assign to a User who will be importing the data.

| improve this answer | |
  • Thanks, that allows me to set the date, but the related list field on Files on my object displays the LastModifiedDate, which although is set to 2005 the same as the CreatedDate SalesForce is changing this to 2016 after opening the file in SalesForce. – developer__c Sep 16 '16 at 17:24
  • I think, it should not get updated, unless there is any modification on the record. – Devendra Sep 17 '16 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.