
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)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.