locked
What all are the supported way to hide/disable left navigation bar on some condition in MS CRM 2011? RRS feed

  • Question

  • Hi Friends,

    I need to hide/disable left navigation bar on some condition in CRM 2011, I would like to know what are all the supported ways by which we can perform the same task.

    Thanks in Advance!

     Thanks,

    -Vineet

    Saturday, December 3, 2011 7:35 AM

Answers

  • Hi,

    Thanks for your response .. We can accomplish this task using JS and below is the sample that can be used.

    Xrm.Page.ui.navigation.items.get();

    for (var i in items) {
       var item = items[i];
    //Apply your BL

      if () {
        item.setVisible(false);
       }


    Vineet
    Sunday, December 4, 2011 3:53 PM

All replies

  • hi Vineet

     its using customization and javascript

     hth

    dkay



     if the response answered your question, please take a minute and mark the response as an answer.

    Saturday, December 3, 2011 10:25 AM
  • Hi,

    We used to hide it by setting the visibility false in CRM 4.0.

    Ex:  document.getElementById('id').style.visible=false;

    It seems that this way is no more supported in MS CRM 2011.

    Could you please let me know by which way we can hide using JS and also supported by MS. Thanks!

     

    Regards,

    Vineet


    Vineet
    Saturday, December 3, 2011 3:59 PM
  • hi Vineet

      there are load of changes to the object model please do refer sdk for complete list of changes.

     you can toggle visibility using the function

    function setControlVisibility(attributename, controlname, value) {   
      var attribute = Crm.Page.data.entity.attributes.getattributename);   
        var control =    Xrm.Page.ui.controls.get(controlname);   
        if (control === null)   
        {   
            return;   
        }   
        control.setVisible(attribute.getValue() == value);   
       }
    


    hth

     if the response answered your question, please take a minute and mark the response as an answer.

    • Proposed as answer by D kay Saturday, December 3, 2011 4:33 PM
    Saturday, December 3, 2011 4:32 PM
  • Hi,

    Thanks for your response .. We can accomplish this task using JS and below is the sample that can be used.

    Xrm.Page.ui.navigation.items.get();

    for (var i in items) {
       var item = items[i];
    //Apply your BL

      if () {
        item.setVisible(false);
       }


    Vineet
    Sunday, December 4, 2011 3:53 PM