Refresh Main page Grid from Ribbon Button wo using crmGrid.Refresh
-
Freitag, 29. Juni 2012 23:07
There are tons of examples in this forum of using a crmGrid.Refresh() to refresh a View, but now that is being depreciated in all browsers!! UR 9. For more details see http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx
On the Home/Main page I have a view of Active records, and a Ribbon button that updates the status of the selected record to completed, and then calls crmGrid.Refresh(), which removes the record from the list.
Anyway, how can I refresh the Grid without using crmGrid.Refresh() so that is works in UR 9??
I don't really want to reload the whole page (window.reload) each time that's a little ridiculous...
Any help would be appreciated!
- Bearbeitet NateOne Freitag, 29. Juni 2012 23:10
Alle Antworten
-
Freitag, 29. Juni 2012 23:17
I am not sure if crmGrid.Refesh() is a general method or not. But The Xrm.Page api
http://msdn.microsoft.com/en-us/library/gg334266#BKMK_refresh
has a Xrm.Page.getControl("mygrid").refresh() method. I think it should serve your purpose.
-
Freitag, 29. Juni 2012 23:32
That function is for refreshing subgrids on a form. Xrm.Page is not available on the Main/Homepage Page.
Any other ideas?
-
Freitag, 29. Juni 2012 23:46
That function is for refreshing subgrids on a form. Xrm.Page is not available on the Main/Homepage Page.
Any other ideas?
Sorry for misunderstanding your issue.
Never mind, I saw you are calling from ribbon button now :)
- Bearbeitet Wei Ma - Vancouver Freitag, 29. Juni 2012 23:54
-
Freitag, 29. Juni 2012 23:54
No problem. I'll restate my problem:
I have a custom Button in the Ribbon of the Home Page for an entity.
It calls a javascript function from a webresources, which updates the selected record and then refreshes the Grid on the Main Page.
How should I do this after UR 9 when I won't be able to use crmGrid.Refresh?
Anyone else have any ideas?