Showing posts with label Refresh Selected View on Button Click. Show all posts
Showing posts with label Refresh Selected View on Button Click. Show all posts

Thursday, March 29, 2012

Refresh Selected View on Button Click in CRM Ribbon

You may have implemented many buttons in CRM Ribbon area to perform your business transactions. And you may create new records, update or delete the records in the grid once the user clicks the Ribbon button. Then you may need to refresh the Grid.

There are many ways to refresh the page or grid, but the issue is once the page reload you will loose the selected view and CRM will load the Default View, instead of the user selected view. And if you want to keep the user selected view even after the Grid is refreshed, You can call the below java script inside your 'ribbon button click' after doing your actions, and before function ends.

grid = window.parent.frames('contentIFrame').document.getElementById('crmGrid');
grid.Refresh();