Hi,
Below is the script to refresh the sub-grid
var mySubGrid = Xrm.Page.ui.controls.get(“{sub-grid name}“);
if (mySubGrid) {
mySubGrid.refresh();
}
To get the sub grid name
- Open the entity customization form
- In designer, double click on subgrid
- In the dialog window, copy the “Name” value
Get Sub grid name
To refresh the main grid, use below script
if (crmGrid) {
crmGrid.Refresh();
}
Hope it helps 🙂

![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)
![[Step by Step] Configure and run 'Pipelines in Power Platform'](https://rajeevpentyala.com/wp-content/uploads/2024/08/image.png)
![[Step by Step] Using Custom Connectors in Copilot Studio](https://rajeevpentyala.com/wp-content/uploads/2024/10/record-ezgif.com-video-to-gif-converter-7.gif)
Leave a comment