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
cfloracflora 

Querying for custom text object not working....

I should preface this with saying that this has been working until today (although I did download and install a new wsdl file).
 
When I try to query for the Id and a custom text field (call it 'text_field__c') it only gives me the ID and not the actual data I want.  Strangely enough it gives me what I would expect if I do it in SForce Explorer.
 
So I do this:
 
SELECT Id, text_field__c FROM custom_object__c
 
And all I get returned is the Id, with no errors.
 
But if I do this:
 
SELECT Id, number_field__c FROM custom_object__c
 
It works just as I would want it to, getting all the desired information.
 
I can even combine them like so:
 
SELECT Id, text_field__c, number_field__c FROM custom_object__c
 
And I get the same as the previous query (I get Id and number_field__c, but no text_field__c).
 
What on earth is going on here?  I assume this is a change in the API being that there was a new release recently.
cfloracflora

Oh...and I'm using the $sforce->query() function to get this information.

 

cfloracflora

To add confusion to this, I outputed the __last_response and it shows that the information I want IS in there, it's just not getting put into the results structure.  This is very strange.

cfloracflora
They must have relased a bug fix or something, cause it's miraculously working all of a sudden.  Cool!
cfloracflora

Now I'm irritated, I recently created a package and therefore caused my custom objects to be renamed, it must have done something internally, cause now this problem is happening again.

The query gives me the Ids back just fine, but will not give me the custom fields that I request.  Like the first time I posted this problem, it works just fine in sForce Explorer.

This is very strange and irritating.

-Chris

CortexCortex
I finally found the problem after much pain and irritation.  PHP caches wsdl files by default, I'm not quite sure what causes it to eventually be re-read, but this oneliner made all my problems go away
 
ini_set('soap.wsdl_cache_enabled','0');
 
Hope this helps someone else out there.