Print this page

We encountered this error while searching ODataService: An error occurred while connecting to the external system. Please try again, or contact your administrator about this error

Knowledge Article Number 000228082
Description Some customers who have Search enabled on an External Data Source may encounter the error

"ODataService: An error occurred while connecting to the external system. Please try again, or contact your administrator about this error. Attempted to reach this URL: https://mycompany.com/ExternalService/vwExternalObject1"

or similar when attempting to search for a record associated to an external object through the Global Search.

Assuming that you have an external data source available and you have external objects already created, typical steps to reproduce this issue would be the following:
  1. Enable search on the External Data Source by going to Setup | Build | Develop | External Data Sources, clicking Edit under "Parameters", checking "Include in Salesforce Searches"  and clicking Save.
  2. Search for a External Object record using Search
  3. You will see the following before hitting the error above:
Searching vwExternalObject1...
Searching vwExternalObject2...
Searching vwExternalObject3..

[Note : vwExternalObject1,vwExternalObject2... are the name of your External Objects]



 
Resolution
  • There is no indexing locally on Salesforce for external objects. External objects are all stored on an external system and thus rely on search capabilities of that external system. 
  • If search is enabled for the data source, Salesforce simply does a call out to the endpoint for each external object backed by that data source and displays the results returned by the data source. The checkbox mentioned in step 1 above controls whether Salesforce will make the call out to find search results. 
  • Unfortunately at present (Summer '15) choosing to do the search at the object level is not yet supported, so if you have a data source where you want to search some objects and not others, you will have to define two data sources each with the same endpoint one with search enabled and one without.
  • There are efforts in motion where we are working on making it even more clear that certain problems may be caused on the external system side in an upcoming release (safe harbor). Until then, a general working rule is if the error message contains "Attempted to reach a URL", something about the endpoint or URL, or some sort of HTTP error code, it can be assumed that this is a problem with the external system.
  • More to the point if you see an "Error received: 500" that is an HTTP code error coming from the external system.  With OData it usually has to do with the external system not following OData specification, a problem with a gateway redirecting and causing issues with the request, or especially with search, it not being configured since it is not standard.
  • The workaround here is to disable search on the Data source under Setup | Build | Develop | External Data Sources.
  • Note that Salesforce cannot disable indexing on external objects based on the above at this time.




promote demote