locked
Edit Form Header Font Size RRS feed

  • Question

  • Is it possible to change the font size shown on a form header? I attempted to create a solution for the entity and export that solution. Using the customization file I scanned through it for anything pertaining to font and I didn't see anything. Perhaps I'm not exporting the correct file. The issue is we have to print out certain forms for other departments that aren't using the CRM yet. They want the font larger in the header fields. I haven't been able to find any answers through Google or attempting exporting of the entity.

    Thank you!

    -Trevor

    Tuesday, March 5, 2013 7:58 PM

Answers

  • Hi,
    the code doesn't need modifications, ms-crm-Field-Label-Print and ms-crm-Field-Data-Print are the css definitions for all the header and footer fields.
    If your intention was to change the size inside the outlook client, that I think that is not possible to do, I attached a screenshot with outlook client and crm form, as you can see, the bigger font applies only inside the crm form.
    Wednesday, March 6, 2013 10:35 AM

All replies

  • There is no capability to change the font size used in Microsoft Dynamics CRM. The font appears larger or smaller on your browser because of a setting that you chose most likely one of the following:

    • The Zoom feature in Internet Explorer. Use Ctrl+ and Ctrl- to change the way the web application displays.
    • You can also make changes to the screen resolution on your computer. With a lower resolution, text appears larger.

    If the answer helped you, remember to mark it as answer.

    Tuesday, March 5, 2013 8:35 PM
    Moderator
  • Hi,
    is possible to change the font size on a form header, but of course is an unsupported modification.
    you need to add this code on your OnLoad event:

    var labels = document.getElementsByClassName('ms-crm-Field-Label-Print');
    for (var i=0; i<labels.length; i++) {
    	labels[i].style.fontSize = '14pt';
    }
    
    var values = document.getElementsByClassName('ms-crm-Field-Data-Print');
    for (var i=0; i<values.length; i++){
    	values[i].style.fontSize = '14pt';
    }
    this code will change also the footer size, is possible to change only the header, but you need to check the parent tree to find if you are inside the header or inside the footer.
    Is also possible to do these things with jQuery, but I prefer simple JavaScript to avoid load the library.

    Tuesday, March 5, 2013 8:37 PM
  • Thank you both for your responses. Guido Preite, you'll have to forgive me I'm not very fluent when it comes to jscript. When I use the code I get an error that the method getElementsbyClassName is not supported. I'm not sure if it makes a difference but I'm using on premise through the Outlook client. From what I looked up that seems to be a common error with web browsers.

    Thanks again,

    Trevor

    Tuesday, March 5, 2013 8:58 PM
  • Hi,
    I tested the code with the web version (with Internet Explorer 9 and Firefox 19) and I can't test with the Outlook client right now.
    I suggest to try if at least works with the web version of your crm environment and which version of Internet Explorer you are using (maybe upgrading to IE9 the code will works also inside outlook)

    Tuesday, March 5, 2013 9:20 PM
  • I am getting the error even on IE9. When you are referring to ms-crm-label-print you are refering to the label title? For example "Owner". Then the data-print would be the field name? Such as, "ownerid"? That's the only part I feel like I might be confusing. 

    Thanks for your help, I appreciate it. 

    -Trevor

    Tuesday, March 5, 2013 10:10 PM
  • Hi,
    the code doesn't need modifications, ms-crm-Field-Label-Print and ms-crm-Field-Data-Print are the css definitions for all the header and footer fields.
    If your intention was to change the size inside the outlook client, that I think that is not possible to do, I attached a screenshot with outlook client and crm form, as you can see, the bigger font applies only inside the crm form.
    Wednesday, March 6, 2013 10:35 AM
  • Alright, thank you for all your help! That answered my question.

    -Trevor

    Wednesday, March 6, 2013 2:28 PM