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
ahmed mediouni 5ahmed mediouni 5 

cant query external object with string 'WHERE' condition

Greetings,

I have created an external object and connected it through heroku to salesforce , when I run this query Select Name from external_object__x WHERE id__c= 24 it works because the WHERE statement have id as parameters which is an integer 
but when I run another query such as Select Name from external_object__x WHERE another_field__c= 'example' , I get 400 bad request , I cant query with a condition equals to a string , help ?
Best Answer chosen by ahmed mediouni 5
ahmed mediouni 5ahmed mediouni 5
In fact, turned out SOQL does not support Long Text Area for queries search, Text is supported on the other hand

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Ahmed,

Greetings!

As for now,we do not have any such limitations on the SOQL queries for External Objects as mentioned here.

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_limits.htm

So,I would suggest you to double check,if the fieldName and Type are valid.

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri
ahmed mediouni 5ahmed mediouni 5
In fact, turned out SOQL does not support Long Text Area for queries search, Text is supported on the other hand
This was selected as the best answer