• Atul Baviskar
  • NEWBIE
  • -1 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I am facing cross domain error on ajax request in javascript

Ajax Request
 
$.ajax({
                    url:"../oppitm/lineitemsort.jsp?id={!oppID}",
                    contentType:"text/html",
                    xhrFields:{withCredentials:true}
                    }).done (
                    function(data){console.log(data)});
Error
XMLHttpRequest cannot load https://ap1.salesforce.com/oppitm/lineitemsort.jsp?id=00690000007jIM1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://nsp-demo.ap1.visual.force.com' is therefore not allowed access.

I have enabled below origin urls in CORS
  • https://*.salesforce.com
  • https://ap1.salesforce.com
  • https://nsp-demo.ap1.visual.force.com
Please suggest or any workarounds how this can be resolved
Greetings, I've created my external object for the Data Integration Specalist Superbadge and have configured my external ID as seen below, however, the challenge seems to not pass, indicating that the indirect lookup was not properly created. Here's how I set up the projectRef__c field, which was what I used to push data from the external object into the project object in Salesforce. Are there any steps, I need to take. Hope it helps.
User-added image


User-added image