Open webresources Modal or Inline using Xrm.Naviagtion.naviagteTo in Dynamics 365 Unified interface

Sending
User Review
0 (0 votes)

Debajit’s Dynamic CRM Blog

Release wave 2 have released some wonderful features and one of them is the capability to open a webresource as modal or inline. I bet this is going to ease the life of lot of consultants who were traditionally using Xrm.Navigation.openWebResource or Xrm.Utility.openWebResource (deprecated) to open webresource and hear about the perennial client complaint of why it is not modal.

Introducing to you, the newest star on the rise – Xrm.Navigation.navigateTo

So let’s see how we can open the webresource as modal. Detailed documentation can be found here – https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/navigateto

Sample code below.

var qs = "param1=1&param2=2"; var pageInput = { pageType: "webresource", webresourceName: "trng_/pages/newapitest.html", data: encodeURIComponent(qs) }; var navigationOptions = { target: 2, // 2 is for opening the page as a dialog. width: 400, // default is px. can be specified in % as well. height: 300, // default is px. can…

View original post 331 more words