Loading

Error "An error occurred while connecting to the external system" When Searching External Objects via Salesforce OData External Data Source

Publiseringsdato: Jun 3, 2026
Beskrivelse

Some customers who have Search enabled on a Salesforce External Data Source may encounter the following error when attempting to search for a record associated to an External Object through Global Search:
"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

This error occurs because Salesforce does not index External Objects locally. Instead, Salesforce makes a callout to the external endpoint for each External Object backed by the External Data Source whenever a search is performed.

Typical Steps to Reproduce:

  1. Enable Search on the External Data Source: Setup > Data > External Data Sources > Edit. Under Parameters, check Enable Search and Save.
  2. Search for an External Object record using Salesforce Global Search.
  3. The search progress shows "Searching vwExternalObject1..." followed by the error message above.
Løsning

This error occurs when Salesforce attempts to call out to the external system to retrieve search results for External Objects backed by an OData External Data Source, and the external endpoint returns an error or is unreachable. Because Salesforce does not store or index External Object data locally, all search queries are forwarded directly to the external system.

Root Cause

Salesforce routes search queries directly to the external endpoint. If the external system is misconfigured, unavailable, or returns an HTTP error, the error message will contain "Attempted to reach this URL."
A general diagnostic rule: if the error message contains "Attempted to reach a URL," mentions an HTTP error code, or references a specific endpoint, the issue originates on the external system side — not within Salesforce.
An "Error received: 500" is an HTTP 500 error coming from the external system. With OData, this typically indicates one of the following: the external system does not support OData search, a gateway is redirecting and causing issues with the request, or search is not configured on the external system.

Workaround

Disable search on the External Data Source by unchecking Enable Search in Setup > Data > External Data Sources > Edit. To control which specific external objects are searchable, select or deselect Allow Search on each individual External Object.

Additional Notes

    • There is no local indexing on Salesforce for External Objects. External Objects are stored entirely on the external system and rely on that system's search capabilities.
    • The Enable Search checkbox controls whether Salesforce makes callouts to find search results for External Objects.
    • Salesforce cannot disable indexing on External Objects at this time.
Knowledge-artikkelnummer

000387806

 
Laster
Salesforce Help | Article