We have a callout inside a class (using @future) which was throwing following exception:
Apex script unhandled exception by user/organization:005A0000001WKkE/00DA0000000KYuL
Failed to invoke future method ‘public static void invokeProcess(String, String, String, Decimal, String, String, String, Datetime, String, String)’ on class ‘FillAccordForrms’ for job id ‘707A000000AYXxu’ caused by: System.CalloutException: IO Exception: Unauthorized endpoint. Please check Setup->Security->Remote site settings.
endpoint = https://hostname:port/soa-infra/services/default/project/client_ep
Before any Apex callout can call an external site that site must be registered in the Remote Site
Settings page or the callout fails.
To add a remote site setting:
- From Setup, click Security Controls | Remote Site Settings
- Click New Remote Site
- Enter a descriptive term for the Remote Site Name
- Enter the URL for the remote site
- Optionally, enter a description of the site
- Click Save
You can also check the steps at official documentation here:
Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Salesforce customization, App development or any other software development assistance please contact us at email@example.com