我正在尝试根据表单的子网格值启用和禁用自定义功能区按钮。我创建了一个简单的 Java 脚本方法作为 Web 资源,并使用工作台在启用规则中调用它。下面是我的代码:
function DisableSendInvitationRibbonButton()
{
alert('test');
var gridControl = document.getElementById("Attendees").control;
if (gridControl.readyState != "complete")
{ alert('readyState not Complete');
// delay one second and try again.
setTimeout(DisableSendInvitationRibbonButton, 100);
return;
}
else
{ alert('readyState Complete');
var ids = gridControl.get_allRecordIds();
alert(ids.length);
}
}
代码只是点击警报“测试”,看起来子网格没有加载。任何帮助,将不胜感激。
谢谢 !