Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

Display Dynamics 365 data in HTML webpage

Posted on by 7

So I have an account that contains a bunch of location addresses. I want to display all the addresses of a specific account in my html webpage form, and they get to choose the addresses based on the dropdown menu of it.  If they choose that specific address it populates my html field with the chosen address.

Im not sure where to start though

pastedimage1669664948008v1.png

So I have a list of locations in this account and in the html webform, I want it to give a dropdown of all available locations of that specific account. Im trying to find the column name for locations in the customizations but i cant find it.

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Display Dynamics 365 data in HTML webpage

    Hi TheDynamicsMan,

    Here are some helpful links:

    1. HTML Web Resources in Dynamics 365 | HCLTech
    2. Web Resources (model-driven apps) - Power Apps | Microsoft Learn
    3. Webpage (HTML) Web Resources (model-driven apps) - Power Apps | Microsoft Learn
    4. (+) How to add custom HTML web resource on a form and use DataTable plug-in to display a grid? - Microsoft Dynamics 365 Community

    To query data in HML web resource. Usee below method:

    function Retrieve(webAPIVersion, entitysPluralName, fetchXmlQuery) {
    //GET[Organization URI]/api/data / v9.0/ EntityDefinitions(LogicalName = 'account') ? $select = DisplayName,IsKnowledgeManagementEnabled, EntitySetName HTTP/ 1.1
    //Accept: application / json
    //OData - MaxVersion: 4.0
    //OData - Version: 4.0
    var req = new XMLHttpRequest();
    req.open(
    "GET",
    Xrm.Page.context.getClientUrl() +
    "/api/data/" + webAPIVersion + "/" + entitysPluralName + "?fetchXml=" +
    encodeURIComponent(fetchXmlQuery),
    false
    );//Sync
    req.setRequestHeader("Prefer", 'odata.include-annotations="*"');
    req.onreadystatechange = function () {
    if (this.readyState === 4) {
    req.onreadystatechange = null;
    if (this.status === 200) {
    var results = JSON.parse(this.response);
    globalVariables.Results = results.value;
    } else {
    alert(this.statusText);
    }
    }
    };
    req.send();
    }

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,151 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,963 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans