Hi all,
I have a custom html page that pops up on a click of a command bad button. This html page creates some records in CRM via javascript code and I want to refresh a sub-grid on the CRM form from which the html page was initiated. I tried using parent.Xrm.Page.getControl("my_subgrid").refresh() but it's not working as it's not fetching the sub-grid object. I'm getting an error:
Cannot read property 'refresh' of null
Has anyone ever succeeded doing something like this before?
Thanks,
-Tony.
*This post is locked for comments
Hi Pravin, nice one! So replacing Parent object with window.top.opener object did the trick. Thank you!
Hi ,
Try once using below syntax:
window.top.opener.Xrm.Page.getControl("my_subgrid").refresh()
Hello,
If you are on Dynamics 20111 use window.parent.xrm.page....
on Dynamics CRM Version > 4 you should add
<head>
<title>HTML Web Resource</title>
<script src="ClientGlobalContext.js.aspx" type="text/javascript" ></script>
</head>
and after that you can access SDK objects and fucntions,
I hope this helps :)
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6