1

I have a custom button in Activity homepage grid ribbon. I have an enable rule that calls a Javascript function. This rule doesn't seem to be working - it's not calling the Javascript function, I've put an alert to verify this. When I test my javascript function by calling from a Form OnLoad, everything looks fine.

So i'm guessing that the Homepage ribbon is not loading the js library somehow ? Has anyone come across this before ? Please help.

<EnableRule Id="RRM.activitypointer.HomepageGrid.RunReport">
    <CustomRule Library="RRM_/Script/Common/Main.js" FuncionName="RRM.Common.enableRunReport"></CustomRule>
</EnableRule>
4

3 回答 3

2

我找到了解决方案。几件事 1. webresource 的调用方式。将规则更改为如下所示的内容

<CustomRule Library="$webresource:RRM_/Script/Common/Main.js" .. >

2. 加载依赖的网络资源(因为此按钮不在表单上)。添加虚拟自定义规则来调用依赖的网络资源修复它

<CustomRule Library="$webresource:name" Functionname="isNAN"/>
于 2013-04-16T10:57:33.217 回答
1

你有一个错字,FunctionName而不是FuncionName

于 2013-04-16T10:08:14.130 回答
-1
    <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>
于 2016-07-08T02:03:05.790 回答