Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Accessing parent CRM page controls from custom HTML resource

(0) ShareShare
ReportReport
Posted on by 109

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

  • Tony Suslovich Profile Picture
    Tony Suslovich 109 on at
    RE: Accessing parent CRM page controls from custom HTML resource

    Hi Ajyendra, I'm using window.open but that wasn't the issue. Pravin above was kind enough to provide the correct solution, so I'm good now. Thanks.

  • ajyendra Profile Picture
    ajyendra 1,732 on at
    RE: Accessing parent CRM page controls from custom HTML resource

    Hi,

    What function you are using for opening popup dialog?

    we will provide better solutions if you share code with us. if problem sharing code in forum. Please Share in PM.

  • Tony Suslovich Profile Picture
    Tony Suslovich 109 on at
    RE: Accessing parent CRM page controls from custom HTML resource

    Hello Kabarousse, thanks for your reply. I'm on 365 (on-prem) and I am trying to access objects and functions using SDK as I mentioned in my question. It's just not working.

  • Suggested answer
    Saad Kabarousse Profile Picture
    Saad Kabarousse 732 on at
    RE: Accessing parent CRM page controls from custom HTML resource

    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 :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans