2012-11-14 84 views

回答

2

您应该可以通过在隐藏HTML元素的页面中嵌入一个隐藏的HTML Web资源来实现它,因为它是打印预览页面。

实施例代码,将转场到不同的色彩:

<HTML> 
    <HEAD> 
     <SCRIPT type=text/javascript> 
      if (top.location.href.indexOf("/print/print.aspx") != -1) { 
       //Do your own DOM manipulation here to hide sections 
       top.frames[0].document.getElementById('caseorigincode_d').firstChild.style.color = '#0000FF'; 

      } 
     </SCRIPT> 
     <META charset=utf-8> 
    </HEAD> 

    <BODY contentEditable=true> 
     <FONT size=2 face="Tahoma, Verdana, Arial"> 
      Testing… 
     </FONT> 
    </BODY> 
</HTML> 

此方法涉及通过:http://www.crmsoftwareblog.com/2011/08/printing-in-crm-2011/

+0

完美,谢谢!我使用了top.frames [0] .document.getElementById('notescontrol_d')。style.display =“none”;隐藏笔记div。它仍然显示说明Notes的部分标题,但对我来说没关系。 –

+0

@JasonLattimer,你在每个地方都有人问及Dynamics:D。 +1好的答案。 –

1

,如果你把:

<field name>_c 

它是页眉/标签

<field name>_d

它是在你的数据值

情况下,只要把:

{ 
    top.frames[0].document.getElementById('notescontrol_c').style.display = "none" 
    top.frames[0].document.getElementById('notescontrol_d').style.display = "none" 
} 
+0

谢谢你,照顾它。 –