web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Refresh subgrid/entity list with JavaScript

(0) ShareShare
ReportReport
Posted on by 215

Hey guys,

Maybe I missed it in the documentation, but I'm looking to find out if there's a way to trigger an entity list (or subgrid on an entity form) to reload in Portals, similar to how we can within CRM?

What I'm really looking to do is have the user press a button which calls a server side function through ajax, the server side functions creates/updates some child records, and when it completes have the JavaScript callback refresh the grid to see the new/updated records.

Any thoughts?

*This post is locked for comments

I have the same question (0)
  • ashlega Profile Picture
    34,477 on at

    Hi Jason,

     not sure if you saw this article:

    community.dynamics.com/.../https-uds-systems-blog

     This does not answer the question of "how to refresh the subgrid" (well, maybe doing a page reload would work, but..), but it does describe one way of implementing that kind of portal-to-server communication.

  • Syed Ibrahim Profile Picture
    6,257 on at

    To get reflect the changes on the server side to portal client immediately . Enable the change tracking of the particular entity on the crm side. The refresh on the client side you can use jQuery

    On chan

    $('#new_customfield').change(function() {

    location.reload(); });

  • JasonMcneil Profile Picture
    215 on at

    Thanks Alex, I hadn't seen that one (though was thinking of a similar way of doing it). Was also thinking of having a Web API on the side which we could call through JS calls, but security/authentication is the hurdle I haven't yet found a good solution to. Pretty close with Azure functions using Azure B2C authentication, but can't figure out the bearer token stuff yet (security is not my forte!)

    Still looking for a way to reload a subgrid too :)

  • JasonMcneil Profile Picture
    215 on at

    Since we're actually using xRM portals community edition, we were able to do the server side easily enough (though thanks for the link, still investigating that aspect for MS portals options).

    And yeah we wound up just refreshing the page :( oh well, it worked good enough

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans