Activity Forums Salesforce® Discussions Can I access Remote Site List from Apex?

  • Himanshu

    Member
    May 25, 2016 at 3:07 pm

    Hi Ravi,

    You can't use the remote sites list is not currently exposed in Apex.

  • Parul

    Member
    September 18, 2018 at 7:46 am

    Hi,

    The remote sites list is not currently exposed in Apex.
    Thanks

  • shariq

    Member
    September 21, 2018 at 12:20 am

    Hi,

    No, you can't access remote site in apex.

    Hope this helps.

  • Parul

    Member
    September 21, 2018 at 4:30 am

    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 Type

    SELECT Id FROM RemoteSiteSetting
    results in sObject type 'RemoteSiteSetting' is not supported.

    This error throw.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs