Wednesday, December 14, 2016

Show Hide Sections in MS Dynamics CRM

/************************************************
stateSectionsOnChange - function to handle which fields 
to show based on the state selected
************************************************/
function stateSectionsOnChange() {
    var closeTab = Xrm.Page.ui.tabs.get("Professional Info");
var showTXSection = false;
    var showOHSection = false;
    var showINSection = false;

    switch (Xrm.Page.getAttribute("col_addressstate").getText()) {
        case "Texas":
showTXSection = true;
            showOHSection = false;
showINSection = false;
            break;
        case "Ohio":
showTXSection = false;
            showOHSection = true;
showINSection = false;
            break;
        case "Indiana":
showTXSection = false;
            showOHSection = false;
showINSection = true;
            break;
    }

    closeTab.sections.get("Texas").setVisible(showTXSection);
    closeTab.sections.get("Ohio").setVisible(showOHSection);
    closeTab.sections.get("Indiana").setVisible(showINSection);
}
/***    end stateSectionsOnChange     ***/

No comments:

Post a Comment

Get files of last hour in Azure Data Factory

  Case I have a Data Factory pipeline that should run each hour and collect all new files added to the data lake since the last run. What is...