Answered by:
Subgrid don't load

Question
-
Hi,
My Subgrid isn't loading and don't showing any error message from javascript.
My code:
function filterSubGrid() {
var grid = document.getElementById("anotacoesSubGrid"); //grid to filter
if (grid == null) {
setTimeout(filterSubGrid, 1000);
return;
}
var incidentValue = Xrm.Page.getAttribute("dual_ocorrenciaeventoid").getValue(); //field to filter by
var incidentId = "00000000-0000-0000-0000-000000000000"; //if filter field is null display nothing
if (incidentValue != null) {
var incidentId = incidentValue[0].id;
}
//fetch xml code which will retrieve all the accounts related to the contact
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
" <entity name='dual_evidencias'>" +
" <attribute name='subject' />" +
" <attribute name='createdon' />" +
" <filter type='and'>" +
" <condition attribute='regardingobjectid' operator='eq' uitype='incident' value='"+incidentId+"' />" +
" </filter>" +
" </entity>" +
"</fetch>";
grid.control.setParameter("fetchXml", fetchXml); //set the fetch xml to the sub grid
grid.control.refresh(); //refresh the sub grid using the new fetch xml
}
Thx
Wednesday, October 9, 2013 8:03 PM
Answers
-
Hi
Check your subgrid Data Source settings, use All Record Types. And set Open Activities as the default view which ever suites your needs.
And try this in fetchxml :
setTimeout(filterSubGrid, 2000);
grid.control.SetParameter("fetchXml", fetchXml);
grid.control.Refresh();-----------------------------------------
If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful" Thank you, Sorde
- Marked as answer by Ralpharada Friday, October 11, 2013 1:28 PM
Friday, October 11, 2013 5:53 AM
All replies
-
- Proposed as answer by SravaniRN459 Thursday, October 10, 2013 10:26 AM
Thursday, October 10, 2013 8:45 AM -
Hi,
The name is correct...
Thursday, October 10, 2013 1:31 PM -
Rollup 12 installed (KB2791312)Thursday, October 10, 2013 4:33 PM
-
-
Returns the error:
The object does not support property or method 'SetParameter'
Thursday, October 10, 2013 9:53 PM -
Hi
Check your subgrid Data Source settings, use All Record Types. And set Open Activities as the default view which ever suites your needs.
And try this in fetchxml :
setTimeout(filterSubGrid, 2000);
grid.control.SetParameter("fetchXml", fetchXml);
grid.control.Refresh();-----------------------------------------
If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful" Thank you, Sorde
- Marked as answer by Ralpharada Friday, October 11, 2013 1:28 PM
Friday, October 11, 2013 5:53 AM -
Hi,
It works fine using All Record Types. And set Open Activities!
thanks so much!
Friday, October 11, 2013 1:28 PM