问题
I have a custom ribbon button on one of my CRM 2011 entities that will effectively disable that entity.
I then would like to refresh the current view on the homepage of that entity. I would like this triggered by JS.
Currently I'm able to refresh the whole parent window which will put me back at the dashboard and not the home page of that entity.
Thanks!
回答1:
Good question. Here are two ways you can do it:
//refreshes the entire element in the parent window that contains the view
window.parent.opener.location.reload();
//refreshes just the grid control that contains the view (probably what you're looking for)
window.parent.opener.document.getElementById("crmGrid").control.refresh();
来源:https://stackoverflow.com/questions/8271868/how-do-i-refresh-the-list-on-the-homepage-view-of-an-entity