locked
Disable Evrything in a form- CRM 2011 RRS feed

  • Question

  • Hi,

    How can I disable everything in  CRM From. I am able to disable all fields. But I wnat to disable all sub grids, buttons in left side navigation pane, so that no related records can be added.

    Thanks & Regards,

    Soumya.

     


    soumya
    Tuesday, October 4, 2011 9:42 AM

Answers

All replies

  • I think you are basically talking about disabling a record.  Otherwise write permissions and such are determined by security roles.  You could do this in code behind a ribbon button or something using a jscript web resource call.

    Here is a syntax example for the setstaterequest (for disabling and enabling records):

    http://mileyja.blogspot.com/2011/07/set-status-or-state-of-record-using.html

     


    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Tuesday, October 4, 2011 10:53 AM
    Moderator
  • Based on  a particular field value, I want all controls on the form to be disabled. Security roles is not an option. I will leave this particular field alone enabled , so when i change it back, the form controls will be enabled back.

    When I say the form is disabled, I want everything except the particular field to be disabled. everything includes , all fields, subgrids, navigation items, so that user cannot add any related entity records. options in the file menu, etc.

     

     

     


    soumya
    Tuesday, October 4, 2011 11:41 AM
  • The fields are easy enough with jscript, but all the other items would be driven by the status of the record or by permissions.  I don't know of another supported way to do what you are trying to do.
    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Tuesday, October 4, 2011 2:03 PM
    Moderator
  • Based on  a particular field value, I want all controls on the form to be disabled. Security roles is not an option. I will leave this particular field alone enabled , so when i change it back, the form controls will be enabled back.

    When I say the form is disabled, I want everything except the particular field to be disabled. everything includes , all fields, subgrids, navigation items, so that user cannot add any related entity records. options in the file menu, etc.

     

     

     


    soumya

    I dont know about disabling the subgrids and navigation items, but you can disabled the ribbons based on a field value using the EnableRules. You can also hide the navigation bar using jscript or Hide the Ribbon Bar using jscript.

    Here is snippet to hide the navigation bar:

    function hideNavigationBar() {
        document.getElementById("crmNavBar").parentElement.style.display = "none";
        document.getElementById("tdAreas").parentElement.parentElement.parentElement.parentElement.colSpan = 2;
    }

     

    Here is the snippet to hide the Ribbon Bar:

    function hideRibbon() {
        window.top.document.getElementById("crmTopBar").style.display = "none";
        window.top.document.getElementById("crmContentPanel").style.top = "0px";
    }

     

    I hope this helps.

     

    Regards,

    Frank


    Tuesday, October 4, 2011 2:44 PM
  • Getelementbyid is not supported for use in CRM outside of independent webresources.

    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!

    Monday, July 9, 2012 3:57 PM
    Moderator