在页面加载时,我收到以下错误消息: ReferenceError:未定义 ShowHideBasedOnAccountType
这些是我遵循的步骤:
我当前的代码
function ShowHideBasedOnAccountType()
{
if (Xrm.Page.getAttribute("glk_phonecall_accounttype").getSelectedOption() != null)
{
var AccountType = Xrm.Page.getAttribute("glk_phonecall_accounttype").getSelectedOption().text;
if (AccountType!=null)
{
if( AccountType == 'Law Enforcement')
{
Xrm.Page.ui.tabs.get(“Summary”).sections.get("LE KPI").setVisible(true);
Xrm.Page.ui.tabs.get(“Summary”).sections.get("CSM KPI").setVisible(false);
}
else
{
Xrm.Page.ui.tabs.get(“Summary”).sections.get("LE KPI").setVisible(false);
Xrm.Page.ui.tabs.get(“Summary”).sections.get("CSM KPI").setVisible(true);
}
}
}
}
有什么线索可能是什么问题吗?
我已经四次检查了我的代码,确保我已在 Dynamics CRM 中添加了我的 Web 资源并且我正在调用它。
看起来您已经完成了所有步骤。有些事情值得尝试。