Gennady
Gennady

Reputation: 41

CRM 2011 RollUp 12 refresh grid

Since the rollup 12 update we can't use this javascript code anymore to refresh grid

from ribbon button onClick (ribbon on grid page)

window.document.all.crmGrid.Refresh();

or from ribbon button onClick (ribbon on homepage) to refresh parent grid

window.top.opener.document.getElementById('crmGrid').Refresh();

How we should refresh grid now?

Upvotes: 2

Views: 3703

Answers (2)

Anish
Anish

Reputation: 618

Suppose you need to refresh form and Maingrid(from where record was opened).

//Refreshing form

window.location.reload(true);

//Refreshing Maingrid

window.parent.opener.document.getElementById("crmGrid").control.refresh();

I have tried in CRM Online(update Roll 12).

Upvotes: 0

Greg Owens
Greg Owens

Reputation: 3878

It no longer works because the method you were using was unsupported. I assume that you are referring to updating a subgrid on a form. The correct way to refresh a grid is to use the refresh method of the grid control as documented here

Upvotes: 7

Related Questions