How do you refresh the grid of a related entity in javascript?

Say you are in the Main Entity form and you click on the Related entity called Product Category --> The Product Category associated View appears and when I click on the custom button Manage Product Category I want the grid to be refreshed:
OnCopyClick: function (primaryControl,outletId) {
debugger;
var formContext = primaryControl;
var grid = formContext.getControl("whatShouldISearchHere?");
grid.refresh();
}
how do I get the control of a Related entity?