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
jmgechjmgech 

User object's FullPhotoUrl

Hi, this is my second day toying with Salesforce. I am trying to run the following simple query from an ObjC app:

Select Id, Name, Username, Email, Phone, FullPhotoUrl from User

 

But that query yields an undefined error.

 

If I modify it to :

Select Id, Name, Username, Email, Phone from User

 

Then it works (but of course, I'm not returning the photo...).

 

Is this a security setting? Does anyone know why that could be? I ran the initial query using Soql Xplorer, and it works...

 

Thanks for any help!

 

J.

Best Answer chosen by Admin (Salesforce Developers) 
Jon Mountjoy_Jon Mountjoy_

Try changing that 19.0 to 20.0 or 21.0.

 

I've just looked at the documentation (the force.com web services API developer guide) and notice that it states next to the fullphotourl field name "This field is available in API version 20.0 and later." - so I think that's your problem.

 

LMK how it goes, and mark this as accepted if it works ;-)

 

Jon

All Answers

Jon Mountjoy_Jon Mountjoy_

Hmm - a difficult one.

 

An objective-C application.  That shouldn't make a difference.

 

But.  The API version should.  Tell me - what API version do you use when connecting with your Objective-C app?

 

Which API are you using? (SOAP/REST), and what URL do you hit to authenticate and then interact?

 

Jon 

jmgechjmgech

Thanks for replying, I've been using the Toolkit for iOS mentioned here: http://wiki.developerforce.com/index.php/Force.com_Toolkit_for_iOS

 

It seems that it uses: https://www.salesforce.com/services/Soap/u/19.0

 

Jeremy

Jon Mountjoy_Jon Mountjoy_

Try changing that 19.0 to 20.0 or 21.0.

 

I've just looked at the documentation (the force.com web services API developer guide) and notice that it states next to the fullphotourl field name "This field is available in API version 20.0 and later." - so I think that's your problem.

 

LMK how it goes, and mark this as accepted if it works ;-)

 

Jon

This was selected as the best answer
jmgechjmgech

Awesome Jon, thanks a lot!

 

For the sake of completeness, that's how to set it. Thanks for your time, I still have a ton to read...

 

[[FDCServerSwitchboard switchboard] setApiUrl:@"https://www.salesforce.com/services/Soap/u/21.0"];

 

Jeremy