locked
how to change height and width of form sections in dynamics crm 2015 by code javascript RRS feed

  • Question

  • Hi,

    I'm customizing a case form. I need to change with Scripting into form onload event, the section width and height. Is it possible?

    Thanks

    Regards

    Wednesday, March 2, 2016 3:46 PM

Answers

  • Hello,

    There is no supported way of doing that. The only way I see make it possible is DOM manipulations but there is no guarantees and it is 100% unsupported.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Wednesday, March 2, 2016 4:15 PM
    Moderator
  • Hello,

    Not supported in any current version of CRM i.e. 1.0/1.3/3.0/4.0/2011/2013/2015/2016.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 8:30 AM
    Moderator
  • I'm pretty sure that dom manipulations are possible but unsupported. FYI here is short overview of unsupported customizations. Put your attention on following paragraph:

    >>Directly accessing the Document Object Model (DOM) of any Microsoft Dynamics CRM application pages is not supported.

    So as I mentioned before - there is no supported way of doing that.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 9:31 AM
    Moderator
  • There is a big difference between possible and supported. Possible means that you can do it. Supported means that if you've done something and you decided to upgrade to newer version it would not break. So I can 3-rd time restate my answer - you can do your size changing using DOM injections but such kind of customizations would be unsupported (i.e. it potentially could stop working after upgrading to newer version of CRM or installing of new updates on CRM e.t.c.

    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 11:11 AM
    Moderator
  • Hi,

    If you create an iframe and inside that has stuff that you manipulate with scripts it is supported since you are not manipulating the CRM DOM, but as soon as you start fiddling with the DOM of the form you are doing unsupported customizations.

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Thursday, March 3, 2016 12:14 PM
  • There are no supported alternatives. I don't know any unsupported alternatives so you are free to play with DOM manipulations to achieve your goal.

    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 24, 2016 3:40 PM
    Moderator

All replies

  • Hello,

    There is no supported way of doing that. The only way I see make it possible is DOM manipulations but there is no guarantees and it is 100% unsupported.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Wednesday, March 2, 2016 4:15 PM
    Moderator
  • Hello,

    no supported on crm 2015 or all crm?

    Thursday, March 3, 2016 8:26 AM
  • Hello,

    Not supported in any current version of CRM i.e. 1.0/1.3/3.0/4.0/2011/2013/2015/2016.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 8:30 AM
    Moderator
  • hello,

    DOM manipulations are supported on crm 4.0 and it is guarantees. Is there the same way for crm 2015?

    thanks

    Thursday, March 3, 2016 9:23 AM
  • I'm pretty sure that dom manipulations are possible but unsupported. FYI here is short overview of unsupported customizations. Put your attention on following paragraph:

    >>Directly accessing the Document Object Model (DOM) of any Microsoft Dynamics CRM application pages is not supported.

    So as I mentioned before - there is no supported way of doing that.


    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 9:31 AM
    Moderator
  • just strange for me because i used before in crm 4.0. i had an iframe into my form and on this iframe i created many DOM elements, i created table and associated event. it works very fine.

    So i'm surprise by unsupported assertion.

    here is a sample for a different thing in crm 4.0


    var iframelisteincident= document.getElementById('IFRAME_listeIncidentsSujet');
    iframelisteincident=iframelisteincident.contentWindow.document||iframelisteincident.contentWindow;
    if(!iframelisteincident){

    return alert("Iframe non trouvé");
    }
    // formulaire
    var form=iframelisteincident.createElement("form");
    form.setAttribute("runat","server");
    var div= iframelisteincident.createElement("div");

    //creation du dom tableau
    var tbl = iframelisteincident.createElement("table");
    tbl.setAttribute("border", "1");


    //création de l'entête du tableau
    var thead= iframelisteincident.createElement("thead");

    ....

    it works.

    Thanks


    • Edited by dc74 Thursday, March 3, 2016 9:39 AM changing frame to form
    Thursday, March 3, 2016 9:38 AM
  • There is a big difference between possible and supported. Possible means that you can do it. Supported means that if you've done something and you decided to upgrade to newer version it would not break. So I can 3-rd time restate my answer - you can do your size changing using DOM injections but such kind of customizations would be unsupported (i.e. it potentially could stop working after upgrading to newer version of CRM or installing of new updates on CRM e.t.c.

    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 3, 2016 11:11 AM
    Moderator
  • Hi,

    If you create an iframe and inside that has stuff that you manipulate with scripts it is supported since you are not manipulating the CRM DOM, but as soon as you start fiddling with the DOM of the form you are doing unsupported customizations.

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Thursday, March 3, 2016 12:14 PM
  • ok Thanks. So which are the alternatives? to do on supported customizations with my needs.

    Regards

    Thursday, March 24, 2016 1:06 PM
  • There are no supported alternatives. I don't know any unsupported alternatives so you are free to play with DOM manipulations to achieve your goal.

    Dynamics CRM MVP
    Read My blog
    Subscribe for one of my courses

    Thursday, March 24, 2016 3:40 PM
    Moderator