Think Dynamic, Do Dynamic Microsoft Dynamic CE | Powerapps || Dynamic CRM || Power Apps || Power Platform

Sunday, 17 March 2024

REFRESHING A WEB RESOURCE IN UNIFIED INTERFACE WITH JAVASCRIPT (THE NEW WAY)

 This post comes from a great find courtesy of an elite dev I work with who goes by “PV”. We had a requirement to reload / refresh an HTML web resource on a page when a user clicked into a tab to view it. This used to be reasonably straight forward in previous D365 versions and JavaScript – get the Web Resource using getSrc, set the Web Resource to null and then back to itself using setSrc. However, this wasn’t working for us in the latest version of D365 / Power Apps.

Here’s how the new code works.

First, get the name of the tab you’re working with. I have a web resource on the Summary tab of the Account, SUMMARY_TAB:

The Web Resource simply displays the current date and time, so we can see if the date/time is updated when I click out of the tab and back into it:


No comments:

Post a Comment

Popular Posts

Featured post

Understanding Dataverse MCP vs Power Apps MCP – Quick Review

  Understanding Dataverse MCP vs Power Apps MCP – Quick Review Model Context Protocol (MCP) has quickly become one of the hottest topics in ...

Post Top Ad

Your Ad Spot

Pages