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.

  • It sounds more like an issue with your endpoint. – PepeFloyd Nov 10 '15 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 '15 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. – Lawrence McAlpin Nov 11 '15 at 12:48
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."

  • That isn't necessary for Odata external data sources. – Lawrence McAlpin Nov 11 '15 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.