Friday, 4 January 2013

Change Default Calendar View in CRM 2011

In this article , I am going to explain how to change Default Calendar View "Day" to "Monthly" or Weekly"

In Personal Setting Option Go to File -> Options-> Acvivities Tab-> Default Calendar View




Expand only selected tab using java script in CRM 2011 (Without RU12)

In this article i am going to explaining how to expand only selected tab from left side navigation links and other tab will collapsed

you need to call this "SetTabonClick" javascript function on your form onload event to auto expand and collapse tabs from left side navigation links


function SetTabonClick() {
var tabs = Xrm.Page.ui.tabs.get();
    for (var i in tabs) {
        var tab = tabs[i];
        var tabName = tab.getName();
        var tabindex = 'tab' + i;
        var tabindexTab = 'tab' + i + 'Tab';
        toggleTabDisplayState(tabName, tabindex, tabindexTab);
    }
}

function toggleTabDisplayState(tabName, tabindex,tabindexTab) {
    var link = document.getElementById(tabindexTab); //tab1Tab
    link.onclick = function () {
        loadArea('areaForm');
        crmForm.GetTab($get(tabindex, crmForm), true); //tab1

        var tabs = Xrm.Page.ui.tabs.get();
        for (var i in tabs) {
            var tab = tabs[i];
            if (tab.getName() == tabName) {
                tab.setDisplayState("expanded");
            }
            else {
                tab.setDisplayState("collapsed");
            }
        }
    }
}