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

Talha Manzoor
0

 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:

Read More

Post a Comment

0Comments

Post a Comment (0)