Refresh Homepage Grid and Ribbon on Click of custom button button in Dynamics 365? Refresh selective entity charts and grids on dynamics 365 dashboard. Yes it is possible using Xrm.Utility.refreshParentGrid() API

This one I found pretty interesting. And in the community you will find this requirement popping up every now and then, specially the requirement to refresh HomePage grid and ribbon on click of a ribbon button. Let’s see the requirement that we had for this.

Say your customer have a ribbon button on the Homepage grid of the Contact entity. The button appears when an item or more than one item is selected from the grid. And you perform some operations on the selected record and then refresh the Homepage grid to reflect the changes. Below is my custom button which on Contact Home Page grid.

Advertisements
image

In the ribbon button click function, once all the operations are completed, to refresh the grid you would need to fire the below lines of code to refresh the parent Homepage grid and ribbon.

var lookupOptions = {};
lookupOptions.entityType = “contact”;
Xrm.Utility.refreshParentGrid(lookupOptions);

And voila! You shall see your parent Homepage grid being refreshed with the below functions. Some hidden gems from Microsoft to do this small small cool stuffs.

Advertisements

Wait the the fun is not over yet. I am in the Sales Hub APP and I open the Sales Activity Dashboard.

image

And for this I launch my developer tools and try the below code.

var lookupOptions = {};
lookupOptions.entityType = “opportunity”;
Xrm.Utility.refreshParentGrid(lookupOptions);

Advertisements

And below is the experience.

Hope this helps!

(Dynamics MVP)

For consultation/ corporate training visit www.xrmforyou.com or reach out to us at info@xrmforyou.com

Our product offerings:

CRM-Sharepoint Attachment uploader and metadata manager (http://www.xrmforyou.com/sharepoint-integrator.html)

Notes Manager (https://debajmecrm.com/2019/02/28/add-metadata-to-your-notes-and-attachments-in-dynamics-notes-metadata-manager-from-xrmforyou-com/)

Role based views for Dynamics 365 (http://www.xrmforyou.com/role-based-views.html)

Record Cloner for Dynamics 365 (http://www.xrmforyou.com/record-cloner.html)

Published by

Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 12 years of experience in Microsoft .NET Technologies and 9 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

One thought on “Refresh Homepage Grid and Ribbon on Click of custom button button in Dynamics 365? Refresh selective entity charts and grids on dynamics 365 dashboard. Yes it is possible using Xrm.Utility.refreshParentGrid() API”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s