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 :
Customer experience | Sales, Customer Insights,...
Answered

OpenWebResource from Ribbon in a new/adjacent tab

(0) ShareShare
ReportReport
Posted on by 25

How can I open a web resource in a new / adjacent tab using Xrm.Navigation.openWebResource?

It always opens in a pop-up window.

Script as follows,

var windowOptions = { openInNewWindow: false, height: 300, width: 500 }

Xrm.Navigation.openWebResource("/myWebResource", windowOptions);
I have the same question (0)
  • Verified answer
    Marco.P Profile Picture
    2,405 on at

    Hi,

    you can use Xrm.Navigation.navigateTo and make the webresource align to side.

    Something like this:

    pastedimage1586516788386v3.png

    Xrm.Navigation.navigateTo({pageType:”webresource”, webresourceName:”new_TestWebResource.html”}, {target: 2, position: 2, width: {value: 50, unit:”%”}});

    Please refer to this:

    https://carldesouza.com/using-the-new-modal-dialog-to-open-forms-in-dynamics-365-using-xrm-navigation-navigateto/

    Hope it helps,

    Marco

  • Sudharshini Profile Picture
    25 on at

    Thank you

  • Marco.P Profile Picture
    2,405 on at

    Hi Sudharshini,

    if you've found the answer helpful, please mark my suggested answer above as verified by clicking 'yes'. This will also mark the thread as "closed".

    pastedimage1586958871874v1.png

  • Sudharshini Profile Picture
    25 on at

    I need to pass some values from CRM form to the modal, I tried with  window.opener.parent.Xrm.Page.getAttribute("myfield").getValue().

    Any thoughts on this part?

  • Suggested answer
    Marco.P Profile Picture
    2,405 on at

    Hi,

    according to the official microsoft documentation you should be able to pass data to your web resource:

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/navigateto

    pastedimage1587133501883v1.png

    Xrm.Navigation.navigateTo({pageType:”webresource”, webresourceName:”new_TestWebResource.html”, data:"yourparameter"}, {target: 2, position: 2, width: {value: 50, unit:”%”}});

    Hope it helps,

    Marco

  • Sudharshini Profile Picture
    25 on at

    I need to read about 10 fields and use it in web resource.

    One way is to do a service call, but just checking if i can read directly using getAttribute.

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

    Here is way to launch a webresource and pass parameter to it and open it in a new window.

    https://vjcity.blogspot.com/2021/04/how-to-open-web-resource-and-pass.html

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans