I have a custom object that I need to do a mass update on to set a field on each to the same value.

I had written a snippet of code to execute in the Developer Console that would get all the correct records and update them. However, when testing users noticed all of them had the Last Modified By field set to my user.

It makes sense since I ran the code in the developer console. However, when pushing it to the production instance, they would like to not have the Last Modified By field set to my user so that the end users don't get confused.

Is there a way to do a mass update without having the Last Modified By be changed to my user? Or maybe reflect that the system changed it?

  • You could create a new user named System User with system administrator profile and then login as that user and proceed with the update.
    – Logie C
    Commented May 15, 2019 at 15:57
  • we use a user seat called Data Migration User for purposes like this. Users less likely to be confused
    – cropredy
    Commented May 15, 2019 at 16:49

2 Answers 2


You can only do this upon inserting records. A script like what you're talking about will always modify the audit fields for Last Modified By and Last Modified Date. You'll want to vote on this idea.


For that, you Can raise a case with Salesforce Support, to Activate the "EDIT AUDIT FIELDS" feature

this will allow you to edit the Audit fields (LastModifiedDate, LastmodifiedbyId CreatedDate and Createdby ) when you insert or update.

then you can update/retain the old values as part of your update/upsert instead of system generated Date and ID's

Vote this idea, if Accurate

  • Can you provide a link to the idea?
    – nbrown
    Commented May 18, 2020 at 15:37

You must log in to answer this question.

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