You need to sign in to do that
Don't have an account?
Wei Dong 10
Embedded CORS doesn't work?!
Hello all:
I tried to embed my own website's page with Salesforce, and I've deployed my static HTML page into Azure as an example , the codes look like this following (this is the WebSite's URL:https://salesforcehtmltest.azurewebsites.net/).
2) Add this website into CORS:
3) When I run the page on Azure, it still doesn't work……Why?
I tried to embed my own website's page with Salesforce, and I've deployed my static HTML page into Azure as an example , the codes look like this following (this is the WebSite's URL:https://salesforcehtmltest.azurewebsites.net/).
<!DOCTYPE html> <html> <head> <meta name="salesforce-community" content="https://dev-conagradev.cs65.force.com"> <meta name="salesforce-client-id" content="3MVG9aFryxgomHTbDJ87BGyiOIOX.JQ_GDxC3h1i72cfZeP_Wm9dgVzNm31vXngKKGYRv665beVbQQL_Bdq9d"> <meta name="salesforce-redirect-uri" content="https://loginwidget.herokuapp.com/latest/_callback.html"> <meta name="salesforce-mode" content="modal"> <meta name="salesforce-target" content="#salesforce-login"> <meta name="salesforce-login-handler" content="onLogin"> <meta name="salesforce-logout-handler" content="onLogout"> <link href="https://dev-conagradev.cs65.force.com/readyseteat/servlet/servlet.loginwidgetcontroller?type=css" rel="stylesheet" type="text/css" /> <script src="https://dev-conagradev.cs65.force.com/readyseteat/servlet/servlet.loginwidgetcontroller?type=javascript_widget" async defer></script> <script> function onLogin(identity) { var targetDiv = document.querySelector(SFIDWidget.config.target); var img = document.createElement('img'); img.src = identity.photos.thumbnail; img.className = "sfid-avatar"; var username = document.createElement('span'); username.innerHTML = identity.username; username.className = "sfid-avatar-name"; var iddiv = document.createElement('div'); iddiv.id = "sfid-identity"; iddiv.appendChild(img); iddiv.appendChild(username); targetDiv.innerHTML = ''; targetDiv.appendChild(iddiv); } function onLogout() { SFIDWidget.init(); } </script> </head> <body> <div id="salesforce-login" data-login-event="onLogin"></div> </body> </html>
2) Add this website into CORS:
3) When I run the page on Azure, it still doesn't work……Why?
I have also done the development like that and I have also faced the ERROR CODE 0XC0000428 (https://errorcode0x.com/error-code-0xc0000428/) in the module while debugging it.