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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Pass entity field value as a parameter in HTML web resourse

(0) ShareShare
ReportReport
Posted on by 197

Hello Experts,

I am using an HTML web resource to display a link in Dynamics 365 Dashboard so that when user clicks on it will take to a Tableau Report. Let's say the link to display in the Dashboard is "My Sample Report". Here is part of the HTML:

<tr>
   <td>
      <a style='color: blue;' onclick='openLinkInWindow('https://tableauURL');" href="#">My Sample Report </a>
   </td>
</tr>

Since the Tableau URL is embedded in the HTML code, it cannot be managed by a user. So I am planning to create an entity to store Tableau URLs, therefore when there is any updates in the Tableau URL, Dynamics user can update the new URL in the entity record.

My problem is how do I get the field value (URL value from the entity) and pass in to the HTML file. Any suggestion?

Example:

5875.Dashboard.png

Thank you!

I have the same question (0)
  • Suggested answer
    indyanin Profile Picture
    60 on at

    Hi,

    Check following link:

    docs.microsoft.com/.../GetGlobalContext-ClientGlobalContext.js.aspx

    You simply need to add to your HTML body following line with reference to the script:

    <script src="ClientGlobalContext.js.aspx" type="text/javascript" ></script>

    Then you have access to the Xrm object as you would normally have when working with js scripts inside forms.

    Hope this helps

    Regards,

    Konrad

  • Suggested answer
    Fubar Profile Picture
    2,761 on at

    Try not to use ClientGlobalContext.js.aspx as this is being deprecated (no date yet, but Microsoft have indicated it will be removed docs.microsoft.com/.../important-changes-coming)

    "parent.Xrm will be removed after the removal of the ClientGlobalContext.js.aspx"

    As per Microsoft Use one of the following:

    a) Use a custom control created using Power Apps component framework instead of HTML web resources.
    b) On forms, use the getContentWindow method of the web resource control.
    c) If the getContentWindow method doesn't work, you can use parent.Xrm to get to the Xrm object inside an HTML web resource. If the HTML web resource is opened in a new window, then you should use opener.Xrm instead.

    This page has some example code for getContentWindow on it docs.microsoft.com/.../getcontentwindow

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 127 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 121

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans