The following is the code that I am using in my project to listen to the gird’s OnRefresh event. In my case, I need to make one field as required on the CRM form when certain number of records have been detected for the associated entity.
function DetectGridRecordChange() { var myframe = crmForm.all.IFRAME_MyFrameId; myframe.onreadystatechange = function() { if (myframe.readyState === "complete") { var frameDoc = myframe.contentWindow.document; frameDoc.all['crmGrid'].attachEvent("OnRefresh", function() { // Do something alert("CRM Grid refreshed! "); }); } } }
No comments:
Post a Comment