CRM iFrame 关联视图记录计数 MS Dynamics
我有一个带有显示关联实体的 iFrame 的 crmForm
。我想验证当用户保存父 crmform
时,iFrame
中的关联视图是否有记录。使用javascript,如何在iFrame
中找到crmGrid的记录计数。
我最接近的是
var frameDoc = document.getElementById('IFrame_contacts').contentWindow.document;
var recordcount = frameDoc.all['crmGrid'].innergrid.Allrecords.lenght;
,这只是给了我一个 innergrid
not find 错误。
谢谢 奥利弗
I have a crmForm
with an iFrame that displays an associeted Entity. I want to validate that the associated view in the iFrame
has records when the user saves the parent crmform
. Using javascript, how can I find the record count of the crmGrid in the iFrame
.
The closest I come is
var frameDoc = document.getElementById('IFrame_contacts').contentWindow.document;
var recordcount = frameDoc.all['crmGrid'].innergrid.Allrecords.lenght;
That just gives me an innergrid
not found error.
Thanks
Oliver
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你很接近。您想要
var recordcount = frameDoc.getElementById("crmGrid").InnerGrid.SelectedRecords.length;
You were close. You want
var recordcount = frameDoc.getElementById("crmGrid").InnerGrid.SelectedRecords.length;