Friday, July 31, 2009

Setting Notes back to Auto Expand

There have been a few times where the Notes section and an IFrame end up on the same tab in CRM. And typically people want the IFrame to show whatever is being displayed to auto expand with the page so that the webpage, report or whatever it's displaying will look good. However, when you do that, it modifies the Notes so that they do not auto expand any more. And since you are not able to modify the Notes properties from the user interface, getting Notes to auto expand with the growth of the window has just become more difficult.

The way around this is to export the XML of the entity and modify the Note XML node. Here is what you Notes XML should look like:

<section showlabel="true" showbar="true" locklevel="1" id="{B798FA27-F9FC-4580-988C-0BA75C444488}" IsUserDefined="0" height="auto" labelwidth="115">
<labels>
<label description="Notes" languagecode="1033" />
</labels>
<rows>
<row>
<cell colspan="2" showlabel="false" rowspan="5" auto="true" id="{8f4963e9-b4cb-4713-b370-62070594185b}">
<labels>
<label description="Note Text" languagecode="1033" />
</labels>
<control id="notescontrol" classid="{06375649-c143-495e-a496-c962e5b4488e}" />
</cell>
</row>
<row />
<row />
<row />
<row height="auto" />
</rows>
</section>

The important points to take away are the height = "auto", auto="true" and the rowspan="5" options. For whatever reason if I didn't set the rowspan equal to 5 the auto growth wouldn't work.

Set the XML right, reimport the XML, publish and you're Notes will be fixed.

David Fronk
Dynamic Methods Inc.

No comments:

Post a Comment