[英]CRM iFrame associated view record count MS Dynamics
I have a crmForm
with an iFrame that displays an associeted Entity. 我有一个
crmForm
与显示的associeted实体的iFrame。 I want to validate that the associated view in the iFrame
has records when the user saves the parent crmform
. 我想验证当用户保存父
crmform
时, iFrame
中的关联视图是否具有记录。 Using javascript, how can I find the record count of the crmGrid in the iFrame
. 使用javascript,如何在
iFrame
找到crmGrid的记录数。
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. 那只是给了我一个
innergrid
找不到错误。
Thanks Oliver 谢谢奥利弗
You were close. 你近了 You want
var recordcount = frameDoc.getElementById("crmGrid").InnerGrid.SelectedRecords.length;
您需要
var recordcount = frameDoc.getElementById("crmGrid").InnerGrid.SelectedRecords.length;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.