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 May 15 '19 at 15:57
  • we use a user seat called Data Migration User for purposes like this. Users less likely to be confused – cropredy May 15 '19 at 16:49

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.

|improve this answer|||||

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.