Unsupported filtering of subgrids in Dynamics 365 (CRM 2016)


In one of the projects which was recently upgraded to CRM 2016 Online Update 1, legacy form rendering was being used. So, we were analyzing how the new form rendering will affect the existing JavaScript.

One of the unsupported JavaScript that was being used was for sub-grid filtering.

The interesting thing was that it works in CRM 2016 Online Update 1 for legacy form rendering but fails in case of new form rendering (turbo form).

For turbo forms, we get the following objects as null

I couldn’t find any workaround of implementing the same in case of turbo forms. The only possible solution that I could think of is either using Quick View Form with Subgrid control inside it or through a html web resource.

Hope it helps..

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

15 thoughts on “Unsupported filtering of subgrids in Dynamics 365 (CRM 2016)”

      1. what about :
        var ContactsIFollow = {
        entityType: 1039, // SavedQuery
        name: “Contacts I Follow”
        //Set the view using ContactsIFollow

        Liked by 1 person

  1. Hii. I use folowing code for CRM2016 with turbo forms.

    var budget_resources = parent.document.getElementById(“budget_resources”);
    if (budget_resources == null || budget_resources.control == null) {
    setTimeout(function () { THE_FUNCTION_NAME(); }, 500); //if the grid hasn’t loaded run this again
    var fetchXml = “<fetch version='1.0'…..
    budget_resources.control.SetParameter("fetchXml", fetchXml); //set the fetch xml to the sub grid
    budget_resources.control.Refresh(); //refresh the sub grid using the new fetch xml


  2. We need to use window.parent.document.getElementById to read GridName
    Wait for the control to load in the DOM before Setting to control

    //fetch xml code

    var fetchXml = “”;
    if (Grid.control != null)
    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
    setTimeout(filterSubGridFunction, 500);


Leave a Reply to Michael Goryachev Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.