Having trouble accessing the ms crm page on my aspx page using "parent.window.xrm.page" in the Chrome browser

Encountering an exception where a frame with origin "https:domain1:port1" is being blocked from accessing a frame with origin "https:domain1:port2". The error occurs at the code snippet "window.parent.Xrm.Utility.openEntityForm("entityName", null, parameters, windowOptions);" in MS CRM 2015

We are integrating a custom page into the sitemap directly (not within an iframe of any entity) by specifying the CustomWEBAPPs’URL at the Sitemap level. However, when trying to access the XRM of the parent page, we encounter the above-mentioned error.

This functionality works properly in IE11 but results in the stated error in Chrome and Firefox browsers.

Has anyone else experienced this issue? Any assistance would be greatly appreciated.

Thank you

Answer №1

It seems like you are encountering issues with cross frame scripting, which is more related to browser functionality rather than CRM.

You can find information here that suggests utilizing Window.postMessage as an alternative. The article also includes additional resources for further details.

There are situations where enabling communication for an IFRAME containing content from a different domain is needed. Window.postMessage is supported by Internet Explorer 8 onwards, as well as Google Chrome, Mozilla Firefox, and Apple Safari.

However, according to this article, using window.open might be the simplest solution in this scenario.

In cases where pages lack access to the Xrm.Utility.openEntityForm function outside the application, consider using window.open or a hyperlink to open a specific record or form for an entity.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

HTML & Javascript |iOS| - Eliminate emojis

Right now, I have an HTML textarea element that enables users to input text, which works well. However, the issue is that users are able to input emojis. I am wondering if there is a way to remove these emojis after they have been entered by the user, or ...

How can I utilize jQuery to iterate through every anchor tag on an HTML page?

I am looking to reference all anchor tags on the page that have a parent h2 tag. To achieve this, I need to iterate through each anchor tag that has a parent h2 and add an attribute using jQuery. <body> <h1>not me</h1> <a href ...

Is it possible to use multiple schemas for one collection name?

I am currently working on creating different schemas for a single collection, such as User or subUser. I aim to store both User and subuser data in the same collection but with different schemas. Here is an example of my schema file: export const AryaSchem ...

The audio file was obtained using "SSH" and then sent back through the "Service", but unfortunately, the API is unable to deliver it to the user

Why is the action not returning anything, even though DownloadCallVoiceFile method seems to be working fine? public virtual async Task<ActionResult> DownloadCallVoiceFile(string uniqueId, CancellationToken cancellationToken) { // CallReport is a ...

Tips on selecting the active color ID from a list of available color IDs

Currently, I am trying to retrieve the color ID of the active color selection. For example, if I have three colors - yellow, blue, and red - with yellow being the default color. In this scenario, I can obtain the color ID of yellow using a hidden input typ ...

What happens to an array element when it becomes null within the realm of JavaScript?

As I work on a complex AJAX control class, I've encountered an interesting question. For instance, imagine I store all page elements in an array upon initialization. When a user triggers an AJAX-enabled link, specific parts of the content are replac ...

What is the best location for storing files that are dynamically created using the ASP.NET Web API?

In my ASP.NET Web API service, files are dynamically generated for users to download at their request. When the remote application sends a request to the API, it triggers the following actions: The file is generated and saved - but where? That's th ...

Having trouble with Jquery UI autocomplete MultiSelect functionality not functioning properly

I have been facing a problem and despite trying various methods and conducting thorough research, I have not been able to find a solution. My issue revolves around selecting multiple values in a textbox using autocomplete. When I try to add the first item, ...

Surprising Results when Using getBoundingClientRect()

Check out this code on CodePen In my current project, I'm attempting to position the footer div at the bottom of the page in such a way that it aligns with the maximum value of the bottom coordinates of both the menu and content divs (Math.max(menu, ...

Update the DIV using instructions sent from the server

Looking to create a webpage that retrieves data from a mySQL database, specifically a value of 0 or 1. The goal is to have a div on the page automatically refresh with the latest value from the database at set intervals. Additionally, it's important ...

Creating a custom calendar application and organizing events through ASP.net for the entire staff within the workplace

Seeking guidance on connecting various components for a new web application in development. The application is being built using .ASP net and requires the user to: 1. log in 2. add, delete, update events in a calendar. Should have a universal calendar ...

A method for altering the values of HTML form checkboxes by toggling between checked and unchecked states, followed by transferring those values to the clipboard

Hello everyone, I'm new to coding and seeking some assistance with a problem I've encountered. My goal is to create a multi-input form with checkboxes, allow the user (me) to fill it out, and then click a "copy" button to transfer the values to t ...

Acquire key for object generated post push operation (using Angular with Firebase)

I'm running into some difficulties grasping the ins and outs of utilizing Firebase. I crafted a function to upload some data into my firebase database. My main concern is obtaining the Key that is generated after I successfully push the data into the ...

"Android Webview's evaluateJavascript function is not returning the expected value

I am attempting to retrieve the username from a webview, but it is returning a null object. webView.settings.javaScriptEnabled = true webView.evaluateJavascript( "(function() { return document.getElementsByClassName('lgn-loginname') })() ...

ASP.NET File Transfer: Uploading and Downloading Files

As a beginner in ASP, I have two questions that are related: What choices do I have for adding controls dynamically to my web part to enable users to upload files larger than 100MB to the server? What options do I have for controls that can prompt a file ...

Automated updating of Google Map markers

I am looking for a way to continuously update the marker on my Google Map to reflect my current position every 15 seconds using Jquery. Can anyone provide guidance on how to achieve this? Here is my code snippet: var x=document.getElementById("message"); ...

Does the memory consumption of a website using Ajax exclusively increase gradually?

I've decided to create a website that relies solely on ajax in order to implement fancy page transitions and other exciting features. Each element on the site is accompanied by a JavaScript/jQuery function similar to this: var slider = { init: fun ...

Create a vue-based browser extension that spans multiple pages

I've initiated my project using vite-plugin-web-extension Starting with a blank project using yarn create vite-plugin-web-extension, I managed to successfully load the extension in my Chrome browser. My goal is to include a login page and another pa ...

Establish a connection to a designated route in Node.js

I have a specific path that I want to establish a socket connection to: http://localhost:3000/home/. Below is my index.js code: var express = require('express'); var app = express(); var http = require('http').Server(app); var path = r ...

What is the best way to free up memory after receiving responseText in a continuous streaming request?

Utilizing xmlHTTPRequest to fetch data from a continuous motion JPEG data stream involves an interesting trick where responseText can populate data even before the request is completed, since it will never actually finish. However, I have encountered some ...