Print Preview in Microsoft Dynamics CRM 2011

  • Posted on: 28 February 2014
  • By: feridun

One of the Update Rollups for Microsoft Dynamics CRM 2011 stopped multiple line of text fields showing the entire contents when printing. Instead the field is shown as a fixed height window with a scrollbar; which is not particularly helpful when printed.

One trick I discovered is to add a web resource to the form for the relevant entity that adds some JavaScript to modify the properties of the field. So that the web resource does not show on the form, ensure that Visible by default is not selected.

The required JavaScript is show below, you must replace 'new_note_d' with the name of the field on you form; make sure that you add "_d" to the end of the field name.

Although this might work it is probably unsupported, because modifying the form appearance in this way is not documented in the SDK.

 

<html><head>
<script type="text/javascript">

if (top.location.href.indexOf("/print/print.aspx") != -1)

{
var description=top.frames[0].document.getElementById('new_note_d');
description.parentNode.style.height = "auto";

}

</script>
<meta charset="utf-8">
</head>
<body>
<font face="Tahoma, Verdana, Arial" size="2"></font>
test
</body></html>

 

CRM Topics: 
CRM Versions: