The object does not support the property or method for the setParameter method when creating the filtered sub-grid in CRM 2011


I am trying to create a filtered sub grid in crm 2011. I found the following link which describe how to make it:

This is how it is recommanded to build the code:

var relatedOHSOrders = document.getElementById("OHSOrderSubGrid_d"); //Set Subgrid Id
var fetchXml = "..."
relatedOHSOrders.control.setParameter("fetchXml", fetchXml);

The problem I have is I get Object does not support .setParameter property or method and when I debbug it I do not see setParameter under relatedOHSOrders.control. I Uninstalled and reinstalled rollup 11 just in case but still having the same issue!

Please note I tried other way to use setParameter. The below code also does not work

relatedOHSOrders.setParameter("fetchXml", fetchXml);

It seems that everybody using this code to have filter subgrid but I am not sure what is my problem that it does not show up.

Thanks in advance for any help or suggestion.

As you could know the latest update rollup for Microsoft Dynamics CRM on-premises and service update for Microsoft Dynamics CRM Online includes significant changes in the web application in order to be able to support a variety of browsers. Have a look at this article:

The script that you are trying to use was working in the previous RUP versions of CRM. The setParameter function is no longer available. Now you can use SetParameter instead of it. Fortunately refresh function is still available. So change the function name in your code and it will work.