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
BondicloudBondicloud 

why we need Remotesite settings?

when we are calling webservices in client side? we must use remote site settings ? why?

even in salesforce to salesforce intigration time also we need remote site settings? why it is that much important?

 

what is the purpose of remotesite settings?

 

 

vin_devvin_dev

When we add the remote site URL to the Remote site settings , then we will be able to access the remote content and fetch the data from it.

nbknbk

The RemoteSite Settings are require to call the service (Ex: 3rd party service - Amazon (http://aws.amazon.com/s3/).)

If you want to connect the Remote site from Apex code.

1) Hard code the urlname in apex code - It is not recommended

2) Retreive the SiteUrl from object, it is showing as "Text" format and the code is not recognize the URL.

3) In general create Remote Site Setting and give the SiteURl and use in Apex code. If you want to change the site url, you can easily change the url from Remote site settings.

Durga Prasad.ax1710Durga Prasad.ax1710

When you are trying to connect an Organization to fetch data or store data into that Organization through REST API. You must need to create Remote-site settings, which are treated as reference of that Organization to Connect.Especially the Client-Id and Consumer-Key in RemoteSite Settings plays major role while Connecting to the Organizatio through Web-Services. 

 

Important :

                   please mark it as a solution If You are Satisfied with this Answer.