web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

MS CRM: Getting CORS Error on access parent Xrm from CRM iframe aspx Page

(0) ShareShare
ReportReport
Posted on by 5

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:

pastedimage1684406281763v1.png



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

pastedimage1684406335429v2.png

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

I have the same question (1)
  • Ray Profile Picture
    1,537 on at

    First make sure you unchecked the option in webresource: Select whether to restrict cross-frame scripting.

    pastedimage1684485900056v1.png

    and read about this learn.microsoft.com/.../enabling-cross-origin-requests-in-web-api.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 71 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 51 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans