I checked this link to add remoteSiteSettings dynamically. Above link suggesting to add visualforce base url to remote site setting first. I am able to insert that without any issues from synchronous visualforce page. I have a requirement where I need to add remoteSiteSetting through postInstallScript.

Here, I am doing a callout to our application through postInstallScript but it does not support callouts, so I am using @future(callout=true). How to create a remoteSiteSetting in this This asynchronous. How can I get this done?

  • Use Named Credentials with callouts, no Remote Site Settings will be needed
    – identigral
    Apr 7, 2020 at 19:26
  • No no no. I want to avoid any additional work to user. If they have to add their custom domain URL to named Credentials manually, remote site settings do the same thing in my code.
    – AshSFcloud
    Apr 8, 2020 at 4:17
  • The users won't have to do anything. You would create an instance of Named Credential and clone it, then manipulate as needed via post-install script. Named Credential combines remote site + other features in one component.
    – identigral
    Apr 8, 2020 at 4:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy