I am trying to do so and I am getting the following error: Invalid status code: 400, response body: [{"errorCode":"INVALIDJOB","message":"InvalidJob : No create/update access for object:CaseHistory"}]

Is it somehow possible to upsert since I have read that this is a read only object. I am trying to migrate the records from one org to another

  • Welcome to SFSE. Please take a moment to read How to Ask and take the tour. Per the documentation, you can't insert into the history object. Nov 7, 2023 at 5:04
  • Thank you David for the How to Ask. I will go through it so in future I am following the rules and thanks for the answer to my question as well.
    – Kestrel
    Nov 7, 2023 at 5:20

1 Answer 1


The audit logs are immutable by design. That is to say, they are designed to be compliant with certain legal processes, like financial audits, security compliance, and even as a level of standard for evidence in a court of law. While it would be helpful to be able to migrate between orgs, that's just not possible. It took salesforce.com a very long time to implement the "Set Audit Fields upon Record Creation", as they were reluctant to break useful audit feature. But they did make it opt-in, so technically it is the subscriber's choice to make those fields less useful.

You must log in to answer this question.

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