开发者

CRM iFrame associated view record count MS Dynamics

开发者 https://www.devze.com 2023-02-22 20:07 出处:网络
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 ca

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 开发者_Go百科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


You were close. You want var recordcount = frameDoc.getElementById("crmGrid").InnerGrid.SelectedRecords.length;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号