+ Start a Discussion
Captain62Captain62 

Certain fields intermittently inaccessible via API

We are having issues where queries against certain fields (both out-of-box, and custom fields) become inaccessible via the API. The same query (against the same record) works correctly 99% of the time. This happens with multiple fields on separate objects (Case, and KnowledgeArticleVersion) queried at separate times (ie not part of the same script or page).

Here's an example of the message we receive back:

INVALID_FIELD: ArticleType, ^ ERROR at Row:4:Column:6 No such column 'ArticleType' on entity KnowledgeArticleVersion'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

And here's the raw HTTP output we receive.

POST /services/Soap/c/29.0/00DC0000000PlX2/0DFC0000000H5KA HTTP/1.1
Host: shoretel.my.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.4.29
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1251

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:enterprise.soap.sforce.com"><SOAP-ENV:Header><ns1:SessionHeader><ns1:sessionId>00DC0000000PlX2!ARwAQAB.8JoFPLxB3BlOlbIZt41Imf0BfLU4M37ANtH1ooAUz7cUnI_esfhWCSskoiFRPSRqxVQf24TYl8jEHakYcbDY5Ulv</ns1:sessionId></ns1:SessionHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:query><ns1:queryString>SELECT Id, &#13;
     CaseNumber,&#13;
     RMA__c,&#13;
&#13;
     Subject,&#13;
&#13;
     End_User__r.Name,&#13;
     Feature__c,&#13;
     Sub_Feature__c,&#13;
     Version__c,&#13;
     Trunk_Provider__c,&#13;
&#13;
     Status,&#13;
     Sub_Status__c,&#13;
     Area__c,&#13;
     Priority,&#13;
&#13;
     Contact.Name,&#13;
     Contact.Account.Name,&#13;
     CreatedDate,&#13;
     ClosedDate,&#13;
&#13;
     Description,&#13;
&#13;
     (Select Id,cg__File_Name__c,cg__File_Size__c,CreatedDate FROM cg__Case_Files__r WHERE cg__WIP__c = FALSE ORDER BY CreatedDate),&#13;
     (Select CreatedBy.Name,CommentBody,CreatedDate FROM CaseComments WHERE IsPublished = TRUE ORDER BY CreatedDate DESC)&#13;
    FROM Case&#13;
    WHERE Id = '500C000000agpxoIAA'</ns1:queryString></ns1:query></SOAP-ENV:Body></SOAP-ENV:Envelope>

SFDC Response
query

HTTP/1.1 500 Server Error
Date: Fri, 13 Jun 2014 20:19:26 GMT
Content-Type: text/xml;charset=UTF-8
Content-Length: 1462
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_TYPE</faultcode><faultstring>INVALID_TYPE:
cg__File_Size__c,CreatedDate FROM cg__Case_Files__r WHERE cg__WIP__c
                                  ^
ERROR at Row:25:Column:68
Didn&apos;t understand relationship &apos;cg__Case_Files__r&apos; in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the &apos;__r&apos; after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.</faultstring><detail><sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault"><sf:exceptionCode>INVALID_TYPE</sf:exceptionCode><sf:exceptionMessage>
cg__File_Size__c,CreatedDate FROM cg__Case_Files__r WHERE cg__WIP__c
                                  ^
ERROR at Row:25:Column:68
Didn&apos;t understand relationship &apos;cg__Case_Files__r&apos; in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the &apos;__r&apos; after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.</sf:exceptionMessage><sf:row>25</sf:row><sf:column>68</sf:column></sf:InvalidSObjectFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Our site is currently live and our customers are not able to view their open Cases because of this. Please consider this urgent.
Always ThinkinAlways Thinkin
Did you find any resolution on this behavior? We're experiencing something similar in our sandboxes although not yet on production.