CRM iFrame associated view record count MS Dynamics
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;
精彩评论