function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anil KamisettyAnil Kamisetty 

Remote Site Setting

Salesforce allows to record Remote Site, which can be used while using the HTTP Requests. Need some insight in the following items ?

Can the Remote Site be querried in Apex ?
Can the Remote Site setting be created in Apex ?

If true, do we have any examples for that.

Any help is greatly appreciated.
Edwin VijayEdwin Vijay
I dont think it is exposed through the API, Waht is the use case you are trying to achieve? Maybe, we could find a workaround
Dilip_VDilip_V
Anil,

Take look at this
http://www.exceptionlesscode.com/how-to-create-remote-site-settings-through-apex/

Let me know if you have any issues.

Mark it as best answer if it works.

Thanks.