• GiuliaM
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hello all,
I have designed an aura component that sends data to another system upon clicking a button and I put it in my Service Console. The page layout of latter has three columns with related lists and record details.
When the button to send data gets clicked I show a lightning:spinner - designed like explained here (https://developer.salesforce.com/docs/component-library/bundle/lightning:spinner/example#lightningcomponentdemo:exampleSpinnerIf) -  that stops when the api return the status.
This works fine, the only problem is that the spinner is shown also in any other related list of the page and I have now idea why. Any suggestion? Thanks!
Hello guys,

I am currently working on the development of a Lightning Web Components, first time developing for Salesforce. I've already searched everywhere but I couldn't find a working solution in order to make requests to my company's server.

I've already added our server to the list of security trusted sites and I am having problems running the following:
fetch('https://example.com', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    data: { ... }
}).then(function(res) {
    console.log(res);
}).catch(e => console.log(e));
This is the error I get:
Access to fetch at 'https://example.com' from origin 'https://origin-dev-ed.lightning.force.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Our API is returning the required 'Access-Control-Allow-Origin' header and we shouldn't be seeing such error. Or am I missing something?
I have a scenario where the Edit button was removed on the cases, Now When I do some updates through Inline editing on the cases, case Assignment Rules are not firing.
Hello guys,

I am currently working on the development of a Lightning Web Components, first time developing for Salesforce. I've already searched everywhere but I couldn't find a working solution in order to make requests to my company's server.

I've already added our server to the list of security trusted sites and I am having problems running the following:
fetch('https://example.com', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    data: { ... }
}).then(function(res) {
    console.log(res);
}).catch(e => console.log(e));
This is the error I get:
Access to fetch at 'https://example.com' from origin 'https://origin-dev-ed.lightning.force.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Our API is returning the required 'Access-Control-Allow-Origin' header and we shouldn't be seeing such error. Or am I missing something?