我有一个自定义按钮在活动主页网格功能区。我有一个启用规则,它调用一个Javascript函数。这条规则似乎不起作用-它没有调用Javascript函数,我已经放置了一个警报来验证这一点。当我通过调用Form OnLoad来测试我的javascript函数时,一切看起来都很好。
所以我猜主页功能区没有以某种方式加载js库?有人以前遇到过这个吗?请帮助。
<EnableRule Id="RRM.activitypointer.HomepageGrid.RunReport">
<CustomRule Library="RRM_/Script/Common/Main.js" FuncionName="RRM.Common.enableRunReport"></CustomRule>
</EnableRule>
我找到解决办法了。有几件事1. web资源被调用的方式。将规则更改为如下所示
<CustomRule Library="$webresource:RRM_/Script/Common/Main.js" .. >
2。加载依赖的web资源(因为此按钮不在表单上)。添加虚拟自定义规则来调用依赖的web资源来修复它
<CustomRule Library="$webresource:name" Functionname="isNAN"/>
您打错了,是FunctionName
而不是FuncionName
<EnableRule Id="RRM.activitypointer.HomepageGrid.RunReport">
<CustomRule Library="$webresource:name" Functionname="isNAN"/>
<CustomRule Library="RRM_/Script/Common/Main.js" Functionname="RRM.Common.enableRunReport"></CustomRule>
</EnableRule>