0

I have a Flow run once by system administrator to update a custom field in all existing records. But I do not want to update the Last Modified By or Last Modified Date fields. How can I do this? I believe it can be done in Data Loader.

I tried this: Give system administrator Set Audit Fields on Record Creation permission (has no effect, for creation only it seems)

In my flow, from in a loop I call Get Record, then set the custom field with an Assignment element, and then call UpdateRecord.

I added these fields to the Get Record element but did not change them in the Assignment element.

  • LastModifiedById
  • LastModifiedDate

Currently the changes have no effect and the last modified date gets updated.

1
  • I saw elsewhere on the net that possibly you can raise a case with Salesforce to enable Edit Audit Fields. I am not sure but it does not sounds like Data Loader needs this to update the last modified date. Does anyone know?
    – skycafe
    Jul 18 '19 at 14:21
0

This can't be done.

Only on record create and only when using Data Loader can you coerce the LastModifiedDate to be something other than now

Set Audit Field Values

Since these fields are intended to be audit fields, it is only possible to set them on record create and not update.

By definition, LastModifiedDate is an audit field and if one could manipulate it in code, it would cease to be an audit field.

If you have other processes that depend on LastModifiedDate you should consider using a different Datetime field that you control that said other processes can inspect

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.