Hi All,
I am retrieve the sub grid values, below function is working fine!
If subgrid has values claim has yes am setting one value.
If subgrid has No am setting one value. If sub grid has both Yes, No i have to set another value. can you please suggest me how to set the both values are in the sub grid?
function RetrieveSubGridRecords()
{
var claimed;
if (document.getElementById("m_pmembers")) {
var grid = document.getElementById("mcsuk_pmembers").control;
for (var rowNo = 0; rowNo < grid.GetRecordsFromInnerGrid().length; rowNo++)
claimed = grid.GetRecordsFromInnerGrid()[rowNo][3].cells[3].outerText;
}
else {
setTimeout("RetrieveSubGridRecords();", 2500);
}
if(claimed=="No")
{
Xrm.Page.getAttribute('k_aclaim').setValue(110090000);
}
else if(claimed=="Yes")
{
Xrm.Page.getAttribute('k_claim').setValue(110090001);
}
else
{
setTimeout("RetrieveSubGridRecords();", 2500);
}
}