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
NickdJNickdJ 

Sforce API Query fails to return full data set

Hi,

I'm having a problem getting the sforce API to return all columns through the API.  My scenario is this:-

(a) I have a custom object called "Foo Bar", hence the table name is Foo_Bar__c
(b) I have custom fields within that object, named apple, orange, banana, hence columns named apple__c orange__c and banana__c
(c) I have downloaded the freshly generated enterprise.wsdl that includes references to apple__c orange__c and banana__c etc...

Query example would be:-
"""
select apple__c, orange__c, banana__c from Foo_Bar__c
"""

Through the API I am able to retrieve some columns but not others without any appreciable logic as to why.  I've checked permissions, types, etc etc etc and I simply can't see what else I should be looking for.  Is there some kind of limit to the number of custom fields (columns) that an object can have that I'm unaware of?

Any ideas?

I'm using the sforce-phptoolkit on salesforce enterprise edition.  Please pardon my cross post here from the General Development board.

N
CWDCWD
I'm having the same issue. I can get the ID but none of the other fields...

any luck on your end?


tks
-CWD
NickdJNickdJ
Hi CWD,

I gave up using the SforceEnterpriseClient.php  and found that using the SforcePartnerClient.php resolved all my issues -- go figure.

N

CWDCWD
found my answer here:
http://forums.sforce.com/sforce/board/message?board.id=PerlDevelopment&thread.id=3024

the WSDL needs to be updated

-CWD
NickdJNickdJ
Good to hear you resolved your problem -- Unfortunately updating the WDSL did not resolve my problem, moving to the SforcePartnerClient.php did...  go figure.

N

HarmpieHarmpie
Not sure if this is solves the actual problem, but I had a similar issue with the PHP toolkit. When you add columns to your query, make sure Id is the first column in the list (SELECT Id, field1, field2 FROM ... and not SELECT field1, field2, Id, .... FROM). If Id is not the first field, the library will screw up the return value.