Skip to main content
13 events
when toggle format what by license comment
Jul 29, 2018 at 17:49 comment added sfdcfox @Robs CORB + Lightning essentially means that all callouts to APIs will need to be Apex-based to succeed. I suspect CORB broke a lot of integrations and apps in Salesforce.
Jul 29, 2018 at 17:38 comment added sfdcfox @Robs CORBs is a new browser feature. It restricts cross-domain access to JSON, XML, and HTML resources (and, as a special feature, text/plain as well). You'll need to read the specs.
Jul 29, 2018 at 17:14 comment added Robs I am slightly confused. Because I am able to call out to other external APIs by setting CORS. So I am not 100% sure why this won't work (being dumb sorry). Is this CORB restriction set on the Salesforce REST API servers?
Jul 29, 2018 at 17:09 comment added sfdcfox @Robs That's correct. Unless salesforce.com actively adds an API endpoint on the lightning.force.com URL (which they likely will never do), there's no means of calling any API other than Lightning-approved methods. Like others have said, the only client-side solution would be a Visualforce proxy, which practically means you may as well just write a VF page instead of a component.
Jul 29, 2018 at 13:08 comment added Robs @sfdcfox Please may I clarify, even if I got the correct Session ID for JsForce, I still would not be able to use it because of CORB regardless of my CORS settings?
Jul 29, 2018 at 11:09 comment added Robs @sfdcfox Thank you. Do we know if there is any plan by Salesforce to a Lightning JavaScript library which has the same capability, or is it impossible due to the security restrictions?
Jul 29, 2018 at 10:47 comment added Christian Szandor Knapp I agree for most Usecases. Valid in my eyes would be tooling API for example.
Jul 29, 2018 at 10:33 comment added sfdcfox @ChristianSzandorKnapp I think so, as long as the VF page makes the calls; you'd basically be using the Visualforce page as a proxy server to Salesforce. I can't see how this would be the lesser of two evils as opposed to just using Apex Code directly.
Jul 29, 2018 at 10:28 comment added Christian Szandor Knapp So, in conclusion, VF + lightning:container, right?
Jul 29, 2018 at 10:23 history undeleted sfdcfox
Jul 29, 2018 at 10:23 history edited sfdcfox CC BY-SA 4.0
added 158 characters in body
Jul 29, 2018 at 9:56 history deleted sfdcfox via Vote
Jul 29, 2018 at 9:55 history answered sfdcfox CC BY-SA 4.0