Hello everyone, I am trying to send call to ss fil...
# suitecommerce
s
Hello everyone, I am trying to send call to ss file from htm file of the ssp application 2.0 but I am getting an error,
Access to XMLHttpRequest at '<https://checkout.eu2.netsuite.com/c.companyid/SSP%20Applications/KeyStone/test/SS_files/testImage.ss>' from origin '<https://companyid.app.netsuite.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.
Any help would be much appreciated.
g
If your trying to access a different domain you'll need JSONP. Might be worth considering why you're going cross domain and whether you can use relative paths instead. https://www.w3schools.com/js/js_json_jsonp.asp
s
Yeah, what Gordon says. It sounds like you've hardcoded a path to the service, rather than using relative paths. You should use our utility functions to determine the path, so that all you need to do is specify the file name.
s
Yes the issue was because of the hard coded path that is resolved now. Thanks alot.
But currently I am still not getting the logs in the script execution log. The error I mentioned is resolved but the ss file logs are still not showing.