You need to sign in to do that
Don't have an account?
snovvblind
Embedding User Profile Pic in Record based on look-up field to user.
If there's a lookup to a user within a record, how do I write a Visualforce page and controller to display that user's profile picture within the record itself? I wanted to see if you had any tips and suggestions on the exact coding itself.
Thanks.
Hey you are just close enough to the solution. Modify your extension as below:
Page(just for reference, no change):
Controller(Just have added a parameter to the constructor for making it work as extension):
All Answers
I do have some sort of a start on this.
I'm getting the following error while saving the Visualforce:
Error: Unknown property 'profileImageUrl' referenced in ChatterPic
Controller:
Visualforce:
snovvblind, You created a controller and page, but you forgot to bind them. use controller attribute in apex:page tag.
Note: While using a list, always ensure if its size is greater than 0, before indexing the list.
Hi Rahul,
How do I then embed the visual force page into a custom object?
In the record page layout, you would be able to add the page to the layout.
Just make sure you use custom object as the standard controller in your page. Use extension instead of extension.
I'm using the following visualforce page now, but I'm running into the following error:
Error: Unknown constructor 'profileImageUrl.profileImageUrl(ApexPages.StandardController controller)' Create Apex method 'profileImageUrl.profileImageUrl(ApexPages.StandardController controller)'
I checked out this topic:
http://boards.developerforce.com/t5/Visualforce-Development/Standard-controller-and-custom-controller-in-one-apex-page/td-p/115620
I just can't figure out how to modify my controller so that I'm passing in the controller into my vf page properly. I'm a little new to both apex and visualforce. Thanks!
Hey you are just close enough to the solution. Modify your extension as below:
Page(just for reference, no change):
Controller(Just have added a parameter to the constructor for making it work as extension):
select FullPhotoUrl from User where Id = '500.....'