function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SrinuSrinu 

User Object - FullPhotoUrl

Hi,

 

I am trying to find the photos of list of users. I am using below SOQL to get the PhotoUrl of USER:

SELECT Id,Name, FullPhotoUrl FROM User WHERE Id='123456789'

 

With that i can get the current page URL. 

 

Also, if someone uploads a second profile photo, I’m not sure where to find the original.

 

Any suggestions would be appreciated.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Satish_SFDCSatish_SFDC
Unfortunately there is no way to get the old photo/s. FullPhotoUrl only stores the latest photo.

Also if you check the documentation:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_user.htm

It says that the FullPhotoUrl stores the recent photo. In case you have already existing Url of an older photo, there is no guarantee that it will return the old photo.

Hope this helps.
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.

All Answers

Satish_SFDCSatish_SFDC
Is chatter enabled in your org.
You can get the FullPhotoUrl only if chatter is enabled.

Further FullPhotoUrl stores only the recent photo.

Regards,
Satish Kumar
SrinuSrinu
Yes, chatter enabled for my org.

Yes, with 'FullPhotoUrl' can retrieve recent/present photo. Any idea hot can we retrieve old photo as well?
Satish_SFDCSatish_SFDC
Unfortunately there is no way to get the old photo/s. FullPhotoUrl only stores the latest photo.

Also if you check the documentation:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_user.htm

It says that the FullPhotoUrl stores the recent photo. In case you have already existing Url of an older photo, there is no guarantee that it will return the old photo.

Hope this helps.
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
This was selected as the best answer