How can you include Chatter User Profile pictures in Skuid?
Here’s a handy trick I learned from Ben to use Chatter pictures (on the User object) to bring images into your pages.
- Add a Model to your page on the User object.
- Include the field SmallPhotoURL or FullPhotoURL in your User object.
- Include a template component or drag the template component as a column in your table. For the template, click to allow HTML and enter or
Hi Anna, I tried the above but my image is not showing up. I created a custome Home Page which will show the current user’s SmallPhotoUrl photo in the left corner of the page. I have added the User model and set the condition to be the ID of the User ID running the page but no luck as yet.
Sean, would you mind giving us login rights to your org so we can check out your page.
How would I use this to display the photo/image of a user instead of the record owner name in a field? In the builder, when I navigate from my model through the Owner relationship, I don’t see these fields listed.
Why would the fields “SmallPhotoUrl” and “FullPhotoUrl” be missing from the user ojbect? I’m pretty sure that chatter will have to be enabled to get these fields, that also means that you won’t be able to use this in a portal implementation - since chatter doesn’t work there. There may be other wrinkles with your SalesForce edition that means those fields are not on your user record. I’m pretty sure you will need to look at your Salesforce configuration rather than at Skuid.
Chatter is enabled, and I can see those URL fields in Skuid if I create custom lookups to the User object, but not when I use the standard Owner relationship. I know the Owner lookup is multi-object, so is that the issue, perhaps?
Ahh - polymorphic fields… They are never going to have the same rich amount of data as you have in direct parent relationships. I think that is your problem.
You could create a second model directly on the user object, that was related to the first model (owner id in model 1 = user id in model 2) and source the image from there. The image would update on save.
I was hoping to pull that User field into my existing model because I’m displaying the fields/photo in a table, so using a separate model won’t work, will it? Maybe I’ll have to automate something to sync a custom User lookup field in the background with the Owner field in this case (though that is a hack).
Oh, I hate that. One of the underexposed value props of Skuid is not having to bring related data into an object using formula fields just to get it show in the same page or report. I’m sure you’ve seen orgs with almost the entire account object duplicated in the opportunity just so they could show account data in a list view. Ack. You don’t have to do that with Skuid.
But here - It seems like you’ll need to go that route to accomplish your desired end.
For everyone else’s reference & completeness, unfortunately it’s not even that easy. You can’t reference such fields through formulas or workflows, either. I’d have to either build a custom User lookup on my object that synchronizes with the Owner one (since custom lookups aren’t polymorphic and therefore the SmallPhotoURL field is available), or build a custom field User.Custom_Photo_URL__c that populates with the value of the standard SmallPhotoURL field (Because confusingly custom User fields are available through polymorphic relationships). With the latter solution, I’d then also have to populate this new field manually or use Apex or a Flow trigger to do so (or more custom pages!), which really isn’t in scope for my project, so it won’t work for my current issue.
Thanks for the follow up Peter.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.