0

I am trying to make a webapi call from apex class. I have an external data source based on oData for Lightning connect. And I am trying to qeury the external object records.

I am getting error - "common.apex.runtime.impl.ApexExecutionException: data.api.DataSourceException: The external system is unreachable. Make sure that the URL is correct in the external data source settings, and that the server's SSL certificate is valid for its domain name. Attempted to reach this URL....

Not sure why this is happening. Is there any issue from Salesforce end due to which the service is interrupted.

Anyone faced similar issue, Any ideas on the same.

3
  • It sounds more like an issue with your endpoint.
    – PepeFloyd
    Nov 10, 2015 at 23:29
  • end point is an open url, it works fine if hit from browser. But when I do from salesforce, It says external system unreachable..
    – Kalpi
    Nov 10, 2015 at 23:59
  • The OData callouts should generate Apex debug logs. Most likely, your external data source isn't configured to hit the url you intended it to. Nov 11, 2015 at 12:48

1 Answer 1

0

Since it is an external system have you white listed the service in Remote Site Settings?

Remote Site Settings

"Before any Visualforce page, Apex callout, or JavaScript code using XmlHttpRequest in an s-control or custom button can call an external site, that site must be registered in the Remote Site Settings page, or the call will fail."

1
  • That isn't necessary for Odata external data sources. Nov 11, 2015 at 12:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .