hey buddies,
I am stuck in this error: 'FilterSubGrid' is undefined at eval code (eval code:1:1)
my task is to filter grid using second filter
plz help me .below is my code:
function FilterSubGrid()
{
debugger;
var rowData = [5];
var gridOfPrescription = window.parent.document.getElementById('Prescriptions');
var filteredRecordCount = Xrm.Page.getControl('diseaseGrid').getGrid().getTotalRecordCount();
for(int i = 0; i < filteredRecordCount ; i++)
{
rowData[i] = Xrm.Page.getControl('diseaseGrid').getGrid().getRows().get(0).getData().getEntity().getAttributes().get('new_disease').getValue()[i].id;
}
var fetchXmlForPrescription = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
" <entity name='new_prescription'>" +
" <attribute name='new_prescribedon' />" +
" <attribute name='new_patientname' />" +
" <attribute name='new_suggestion' />" +
" <attribute name='new_weightofpatient' />" +
" <attribute name='new_patientname' />" +
" <attribute name='new_prescribedbydoctor' />" +
" <attribute name='new_issueof' />" +
" <attribute name='new_disease' />" +
" <order attribute='new_name' descending='false' />" +
" <link-entity name='new_patientdisease' from='new_disease' to='new_disease'>"+
" <filter type='or'>"+
" <condition attribute='new_disease' operator='eq' value='" +rowData+ "' />"+
" </filter>"+
" </link-entity>"+
" </entity>" +
"</fetch>";
gridOfPrescription.control.SetParameter("fetchXml",fetchXmlForPrescription);
gridOfPrescription.control.refresh();
}
*This post is locked for comments