【问题标题】:Check boxes and Tabs in CRM 2011CRM 2011 中的复选框和选项卡
【发布时间】:2014-06-27 17:00:21
【问题描述】:

我有 3 个复选框(A、B、C)和 3 个选项卡(A、B、C)。选中“A”时,需要打开选项卡 A(需要关闭选项卡 B 和 C)。检查'B'时(需要关闭TAB A和C,选项卡B需要打开。我如何实现这一目标?.有人有我可以使用的功能。

【问题讨论】:

  • 您已经在stackoverflow.com/questions/24417859/… 提出了基本相同的问题。如果您收到的答案不充分,您应该编辑该问题以清楚起见。创建新问题会使 StackOverflow 变得混乱,是一种不好的做法。

标签: javascript dynamics-crm-2011 customization crm


【解决方案1】:

转到您拥有CheckBoxesTabsentity 中的form Properties

选择Checkbox A,点击Change Properties,然后创建自己的函数,如下所示,命名为MakeTabsRequired

现在在函数MakeTabsRequired

function MakeTabsRequired()
{
//string TabA =Xrm.Page.ui.tabs.get("A").getDisplayState()
//string TabB =Xrm.Page.ui.tabs.get("B").getDisplayState()
//string TabC =Xrm.Page.ui.tabs.get("C").getDisplayState()

if(Xrm.Page.ui.controls.get("CheckboxA").getAttribute().getValue()=true)
{

Xrm.Page.ui.tabs.get("A").setDisplayState('expanded');
Xrm.Page.ui.tabs.get("B").setDisplayState('collapsed');
Xrm.Page.ui.tabs.get("C").setDisplayState('collapsed');

}
else
{

Xrm.Page.ui.tabs.get("A").setDisplayState('collapsed');
Xrm.Page.ui.tabs.get("B").setDisplayState('expanded');
Xrm.Page.ui.tabs.get("C").setDisplayState('expanded');

}
}

这里名为“Shipping same as Billing Info”的控件是一个 CheckBox,我已将该函数附加到 CheckBox 的 OnChange

Similarly attach function to OnChange of Checkbox B and C

【讨论】:

  • 谢谢。我尝试了此功能,但出现以下错误“无法分配给功能结果”
  • @user3429723 我想我错过了Closing 函数括号
猜你喜欢
  • 1970-01-01
  • 2013-06-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多