CRM 2015 – Javascript to wait for a grid to load and then check for rows:
Hi, I want to know the answer for this question.
CRM 2011 – Javascript to wait for a grid to load and then check for rows function is there. (
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | functionSubGridOnload() { /// /// waits for the new Claimant expenses grid to load before checking for records. /// vargrid = Xrm.Page.ui.controls.get('CrmGrid')._control;if(grid.get_innerControl() == null) {setTimeout(SubGridOnload, 1000);return; } elseif(grid.get_innerControl()._element.innerText.search("Loading") != -1) {setTimeout(SubGridOnload, 1000);return; }varids = grid.get_innerControl().get_allRecordIds(); if(ids.length > 0) {SetDisplay(true); } else{SetDisplay(false); } } |
My question is what is the proceduce to load the sub grid data before javascript function calling?
I want this answer please help me...
Thanks in advance.