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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM 365 - window.open and Page Refreshing

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I am working on a CRM 365 on-premise instance and have run into an issue / business requirement that I'm a bit stuck on.

I have a sitemap button that opens an HTML Webresource and displays accounts based on some queries.

The business requirement states that when the user clicks on an account, it should open in another tab
I'm familiar with Xrm.Utility.openEntityForm but I know that will only open in the same window or a new window.

I've been using the following:

window.open("/main.aspx?etn=" + "account" + "&extraqs=&histKey=" + randomNumber + "&id={" + Guid + "}&pagetype=entityrecord", "_blank", "", true);

This works great except when the account page opens and you press F5, instead of refreshing the same page, it will instead be replaced with another instance of the HTML webresource.

I can add the &newWindow=true parameter to the above URL and that will fix the refreshing issue but there is a side effect of when I try and open a new window (CTRL + N) from the opened account page.. It will open a new window but then start reopening the webresource over and over again infinitely within the same window.

I know I'm stepping into the boundaries of unsupported functionality but I was wondering if anyone else has run into this before or would have any suggestions?

Thank you,

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hello again,

    I wanted to update this post with a solution that I found which appears to be working at the moment...

    I added the &newWindow parameter back into the URL and I changed the etn parameter to etc and used the object type code.

    For some reason, using the object type code with the new window parameter fixed the issue as far as I can tell.

    Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans