1
votes

I am working on Dynamics CRM 2011 (UR13) and trying to display an HTML Web resource (which contains a Silverlight XAP file) as a Modal Dialog from a Ribbon Button.

The Ribbon action XML is as below. More or like the MSDN examples.

       <Actions>
         <Url Address="$webresource:new_Wizard.htm" PassParams="true" WinMode="1" WinParams="dialogHeight=100; dialogWidth=100" />
       </Actions>

In both Chrome and Firefox, the dialogHeight and dialogWidth values are honoured.

However, in IE9 (the RTM supported version) these are ignored and the pop-up window is huge (almost full screen).

Has anyone else seen this behaviour or know a workaround?

Best Regards,

Shaun Harvey

2

2 Answers

1
votes

I am opening up the HTML Web Resource from a Javascript Function instead (triggered by the click of the Ribbon Button).

This function uses the Xrm.Utility.openWebResource() method introduced in Roll-Up 8 of CRM 2011.

http://msdn.microsoft.com/en-gb/library/jj602956(v=crm.5).aspx

The Function call allows you to specify the web resource URL, and the size of the pop-up window.

Xrm.Utility.openWebResource("new_webResource.htm?typename=account&userlcid=1033", null, 300, 300);

This seems to be rendered properly by all three of the browsers.

0
votes

As a possible workaround you can choose one of 2 options: 1. Add OnLoad javascript to your html webresourse that will set correct size to your dialog window. 2. Replace action with JavaScript function that will open your dialog window with proper sizing.