Hi,
I've searched around trying to find out how I can open an html webresource in a modal form in the unified interface for an on-premise deployment.
I have found Xrm.Navigation.navigateTo but it appears to be only for online implementations.
Does anybody know how this can be achieved for an on-premise deployment?
Hi Snice,
I have it working thanks to your help, you really got me out of a whole with this one. And thanks for sharing your solution to the sizing problem, I was thinking I would have to create a new dialog box for each webresource I needed to display, I will try implementing your method this morning.
Again thanks so much for your help.
If you want to have the same size for all the webresources you show, then it's easy you can adjust the rowspan attribute
In our case, every webresources has a different size... So the size have to be dynamic according to the IFrame content.
I didn't find any supported way to do that.
Here is what I ended to do:
function onload(e) { //... fc.ui.controls.get("IFRAME_ModalDialog").setSrc(Xrm.Utility.getGlobalContext().getClientUrl() "/webresources/" webresource "?data=" data); $("#IFRAME_ModalDialog").ready(function () { setTimeout(function(){ resize();}, 300); }); } function resize(){ var webresourceHeight = window.top.$("div[data-id='PopupDialog']").find("div[role='presentation']").first().height(); window.top.$("#id-473a54c3-4989-4408-9b78-181a0b90d162-1-IFRAME_ModalDialog-webResourceLabelControlWrapper").height(webresourceHeight-35); }
The guid that is in the id part correspond to the FormId
I spent lot of time on that and didn't find any better solution..
I have managed to change the dialog hright, but not the Iframe height - How do you do that?
Yes you can leave them like that or generate new one, it doesn't matter. Most important is they should be unique.
The HandlerUniqueID guid's are they all arbitary or have they got to be retrieved from your CRM organization?
It seems the blog article has two different ones for PopupDialog.js
in case you need to close the popup from your webresource here is the trick:
$("button[data-id='dialogCloseIconButton']", parent.document).click();
I'll give it a go and see how I get on - thanks for you help.
There is no Next button. It will show only the content of your webresource as the idea behind that is basically a form with an IFrame that will display your webresource.
Hi Snice,
Thanks for your quick reply, I did see that post but was a bit confused as to what code belonged in the PopupDialog.js script.
When you implement this do you get the 'Next' button appearing?
Thanks
Hi
I was in exactly in the same situation last week! I used the Dialog Box for that. You can refer to following post
I had to fix some sizing problems but globally it's fine.
Snice
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156