Unknown query parameter: $count in Salesforce when attempting to do a SOSL query - Forum - DataDirect Cloud - Progress Community

Unknown query parameter: $count in Salesforce when attempting to do a SOSL query

 Forum

Unknown query parameter: $count in Salesforce when attempting to do a SOSL query

This question is answered

Hi -

I have a simple oracle table consisting of just 4 varchar2 columns.      I'm able to query the table within my DataDirect console without issues.    I built an external source in SF, successful sync, and then an external object.    However, I'm not able to pull data.    If I go to Workbench Query and perform this:

SELECT FNAME__c,LNAME__c,PHONE__c,SFID__c FROM JT_ACCOUNTS__x  

I get the following error:

UNKNOWN ERROR: EXTERNAL_OBJECT_EXCEPTION: An error occurred while connecting to the external system. Please try again, or contact your administrator. Attempted to reach this URL: service.datadirectcloud.com/.../JT_ACCOUNTS. Error received from the external system: 403: { "error" : { "code" : "222206327", "message" : { "lang" : "en-US", "value" : "Unknown query parameter: $count" } } }

Verified Answer
  • The error message suggest the request used $count as one of the query parameters.  In OData V2, the $count can only be specified as part of the path.  To have the count included in the result, OData V2 uses the $inlinecount parameter.  In OData V4, the specification now uses $count as a parameter and dropped the $inlinecount parameter name.

    Is it possible that the external source that you configured in Salesforce was configured to use OData V4?

All Replies
  • The error message suggest the request used $count as one of the query parameters.  In OData V2, the $count can only be specified as part of the path.  To have the count included in the result, OData V2 uses the $inlinecount parameter.  In OData V4, the specification now uses $count as a parameter and dropped the $inlinecount parameter name.

    Is it possible that the external source that you configured in Salesforce was configured to use OData V4?

  • Thanks for the reply.    You are exactly right - I figured this out about 10 minutes after I posted my question and updated the external source to OData V2 and now can pull the data in SF.