Hi All,
I am able retrieving the sub grid cell value with YES or NO Conditions.
Sub Grid have more than 5 records.
Some records claim history has Yes and some records Claim History Record is NO.
if Sub gird records few of them has YES and Few of them has No i have set the different option set value. I am not able to set the array or ArryList . Please suggest it below code
function RetrieveSubGridRecords() {var Hasclaimed;
if (document.getElementById("mc_policymembers")) {
var grid = document.getElementById("mcsuk_policymembers").control;
for (var rowNo = 0; rowNo < grid.GetRecordsFromInnerGrid().length; rowNo++)
Hasclaimed = grid.GetRecordsFromInnerGrid()[rowNo][3].cells[3].outerText;
}
else {
setTimeout("RetrieveSubGridRecords();", 2500);
}
if (Hasclaimed == "No") {
Xrm.Page.getAttribute('mc_hospitalclaim').setValue(110090000);
}
else if (Hasclaimed == "Yes") {
Xrm.Page.getAttribute('mc_hospitalclaim').setValue(110090001);
}
else {
setTimeout("RetrieveSubGridRecords();", 2500);
}
}