Change the Fetch XML and set the subgrid ID
var leadGrid = document.getElementById("Contact");//Set Subgrid ID
//If this method is called from the form OnLoad, make sure that the grid is loaded before proceeding
if (leadGrid.readyState != "complete")
//The subgrid hasn't loaded, wait 1 second and then try again
var fetchXml = "
//Inject the new fetchXml
//Force the subgrid to refresh