3

I've got a autolaunched flow on the user object (create/update). The flow should run when user updates their profile picture but, for some reason, doesn't.

In debug mode, the flow runs all the appropriates steps (get records, updates records) with the correct values yet, it doesn't seem to fire when I update the User record's profile picture.

Any ideas why the Flow won't trigger?

1 Answer 1

3

It's not an issue with the Flow, but the fact that updating the user's profile picture doesn't run any triggers for User. The same applies to the banner photo.

You can quickly test this with apex triggers and debug logs (none will be generated). You'll also note the LastModifiedDate does not change if you just change the photo.

In terms of documentation, it's not explicitly called out (though others have noted this behavior) but I believe the issue is due to the fact that the fields on User that correspond to the User photo are derived fields from the Photo record (prefix: 729) that contains the image. Similar to how a formula field wouldn't trigger an update on a given object if its related object value changes.

  • FullPhotoUrl
  • SmallPhotoUrl
  • BannerPhotoUrl
  • MediumBannerPhotoUrl
  • SmallBannerPhotoUrl

You see mention of this in the Change Event Message Structure

The fields that a change event doesn’t include are:

  • The IsDeleted system field.
  • The SystemModStamp system field.
  • Any field whose value isn’t on the record and is derived from another record or from a formula, except roll-up summary fields, which are included. Examples are formula fields. Examples of fields with derived values include LastActivityDate and PhotoUrl
2
  • Very interesting. Thanks for sharing this valuable insight! Given this, would my only choice be to run a scheduled triggered flow (periodically) to grab the latest FullPhotoUrl for all profiles and update? Seems like it would be a waste of resources...
    – Jean-Se
    Jan 5, 2022 at 20:41
  • Unfortunately, that seems to be the only option (scheduled apex/flow) if you do need to update something based on user photo. I'm not sure what you're updating based on the photo, but I would consider how often you'd need to run it as that could get unwieldy easily - especially if you use scheduled flow. Jan 5, 2022 at 21:01

You must log in to answer this question.

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