locked
How to change an element's size at runtime on an CRM 2016 form RRS feed

  • Question

  • I need to change the height of a DIV element (which is a multiple line text field) in my CRM 2016 form when loading or saving the form so that the element expands and displays all its content.

    I know that there is a form option to expand fields but it can only be used for one field in a tab and there is already another field that uses that setting.

    I also know that an option is to place the field in another tab and use the expand setting, but I am wondering if there is any way (short of accessing the DOM as Microsoft does not support it in CRM 2016) to get hold of the field/element in the page on the fly and change its height. Can this be done using Xrm.Page libraries?

    Thanks

    Wednesday, March 29, 2017 3:07 PM

All replies

  • Oh, how I wish this was possible.  :)

    I spent the better part of a day trying to find a way to expand a web resource DIV and nothing worked.  Even accessing the DOM didn't seem to work, although to be honest I finally just gave up.

    There aren't any Xrm.Page commands to do this that I am aware of, but if you find one please update this post.

    Wednesday, March 29, 2017 8:41 PM
  • Check given link to change css on load of form.

    https://community.dynamics.com/crm/f/117/t/201443


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Thursday, March 30, 2017 5:56 AM
  • Thank you for your reply Chris. I wasted the same amount of time in vain. I will certainly update this post if I find any solution.
    Thursday, March 30, 2017 4:23 PM
  • Check given link to change css on load of form.

    https://community.dynamics.com/crm/f/117/t/201443


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Thank for your reply Santosh. CSS alone is not enough to increase the height of the element.
    Thursday, March 30, 2017 4:26 PM