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 :
Microsoft Dynamics CRM (Archived)

Passing parameters and open HTML web resource in same window(same page)

(0) ShareShare
ReportReport
Posted on by 894

Hi all,

I want to open a web-resource in same window as that of the entity form from where i trigger the action to open the web-resource, however using XRM.Utility.openWebResource() opens the page in the adjacent same window . can i use XRM.Utility.openWebResource() to open page on the same tab?

I tired below code but I can't good results.

var options = { openInNewWindow: false };

var params = encodeURIComponent("entityGUID=" + currentEntityGUID + "&opportunityGID=" + opportunityID + "");

Xrm.Utility.openWebResource("path", params, 700, 800, options);

Thank You

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    NODAL Profile Picture
    860 on at

    Hi

    I have faced similar issues.

    try using below code.

    window.location.href="https://<ORG>/main.aspx?cmdbar=true&navbar=on&pagetype=webresource&webresourceName=<Web Resource Name>&data=<Parameters>"

  • Suggested answer
    ajyendra Profile Picture
    1,738 on at

    Hi,

    Use this window.open(URLPath, "_self"); 

    its works for me.

    Please mark as verified if answer is helpful for you.

    Thanks

    Ajyendra

  • Suggested answer
    Vipin J Profile Picture
    1,603 on at

    Xrm.Utility.openWebResource() performs different in Chrome compared to IE11.

    openInNewWindow = true/false in parameter windowOptions  is not available for openWebResource()

    [View:https://vjcity.blogspot.com/2019/05/how-to-pass-and-retrieve-custom-data-to.html:750:50]

    window.open works to get around this issue with IE

  • ajyendra Profile Picture
    1,738 on at

    That Great !!

    Using window.open works for you now. OR still facing some issues?

  • erhan.keskin Profile Picture
    2,253 on at

    Hi,

    You can use "Xrm.Navigation.openWebResource" instead, however it would not work as expected in Chrome. What browser do you use?

    [View:https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openwebresource:750:50]

    Regards,

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans