I've enabled "Set Audit Fields upon Record Creation" permission on a permset (as per help page).

Inserting it via:

sfdx force:data:bulk:upsert -s MyNS__Some_Record__c -f invs.csv -i Id -w 5


INVALID_FIELD_FOR_INSERT_UPDATE:Unable to create/update fields: LastModifiedDate. Please check the security settings of this field and verify that it is read/write for your profile or permission set.:LastModifiedDate --

2 Answers 2


It sure looks like the Bulk API doesn't currently support "Set Audit Fields upon Record Creation" at the moment based on experimental results. I suspect that's an oversight. I'll ask.


@dzh - You need two levels of setup for this to work and you have done only one.

  • User Interface Setting - This is org level setup needed before you give permission to Profile or Perm set
  • Profile or Perm set permission - After enabling User Interface setting now go ahead and add the permission to the profile or Permset

If you skip step 1 and do the step 2, although you add the permission in profile/permset the audit fields are not editable. I faced the same issue before checking out the documents


  • Thanks, but that does not answer anything. First setting just hides second one - you can't add that permission before enabling globally. Just tried same steps on a fresh scratch org and no bueno.
    – dzh
    Commented Sep 17, 2019 at 4:03
  • Tried with adding setting for profile as well as permset (which took way longer than needed - can't change sysadmin profile of default user) - that didn't help at all...
    – dzh
    Commented Sep 17, 2019 at 4:18
  • Data point: In early 2020, I just successfully used the bulk API (through the Python "Simple Salesforce" package) to upsert Task records with LastModifiedDate and CreatedDate set to dates in the past after getting my user permissions right. (That said, I'm having trouble with ActivityDate making bulk loads fail.)
    – k..
    Commented May 8, 2020 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .