We are upgrading our CRM environment from 8.2 to 9.1. We have few modules in the System which are having Iframe loading web application(having aspx pages) on the CRM record.
Basically the issue is that we are unable to access parent.Xrm object inside aspx page of my web application to populate the CRM form fields from web application data.
For example: in the below screenshot when user clicks on the Select button it should populate the values of the selected row on the CRM form.
CRM Url: https://crmserver/TestOrg
Web Application: https://crmserver:4444/Home.aspx
CRM form:
Javascript in the ASPX Page:
function PostBackToCrm(){
parent.Xrm.Page.getAttribute('name').setValue('ABC');
parent.Xrm.Page.getAttribute('address').setValue('123ABC');
parent.Xrm.Page.getAttribute('phone').setValue('1234567');
}
We are getting Cors Error at parent.Xrm in browser:
Uncaught DOMException: Blocked a frame with origin "https://crmserver:4444" from accessing a cross-origin frame
We have tried adding below settings in both CRM web.config and Webapplication web.config files but it is not working
Note: We cannot convert Web application to html Web resource as there is a lot of logic in Web application and it needs a lot of redesigning work.
Earlier users were using IE hence we didn’t get CORS issues. We are getting CORS errors with latest browsers