Hallo, I have a sub grid with name 'Fields', which has 2 rows, and I want to show the value '2' in the filed 'Number of Fields'.
I have added the javascript to Form Libraries:
function onLoad() {
var totalcount = Xrm.Page.getControl("Fields").getGrid().getTotalRecordCount();
Xrm.Page.getAttribute("new_numberoffields").setValue(totalcount);
}
and by Form event handlers OnLoad calls the function 'onLoad', but the Field 'Number of Fields' shows '0'.

I can see in a web resource, the variable totalcount is 2, but I can't show this 2 in Field 'Number of Fields'.
Could anyone please help me?
Thanks a lot.
*This post is locked for comments
I have the same question (0)