Activity › Forums › Salesforce® Discussions › Can I access Remote Site List from Apex?
Tagged: List, Remote Site, Salesforce Apex
-
Can I access Remote Site List from Apex?
Posted by Ravi on April 30, 2016 at 6:13 PMCan I access Remote Site List from Apex?
Parul replied 7 years, 7 months ago 4 Members · 4 Replies -
4 Replies
-
Hi Ravi,
You can’t use the remote sites list is not currently exposed in Apex.
- [adinserter block='9']
-
Hi,
The remote sites list is not currently exposed in Apex.
Thanks -
Hi,
No, you can’t access remote site in apex.
Hope this helps.
-
I have use this to find the reason
The RemoteSiteSetting is not directly exposed in Apex. It is neither possible to query it, nor to instantiate it.
RemoteSiteSetting s = new RemoteSiteSetting();
results in Invalid TypeSELECT Id FROM RemoteSiteSetting
results in sObject type ‘RemoteSiteSetting’ is not supported.This error throw.
Thanks
Log In to reply.