/************************************************
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 ***/
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