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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

WebResource Not Working

(0) ShareShare
ReportReport
Posted on by 57

I am trying to load a web resource on a custom entity form. The page works outside of Dynamics but when put into a web resource it just shows a blank page. The source of the web page is below. Any ideas what is going wrong?


<html><head><script>
    var pinInfobox;
   
    function GetMap() {
   
        var pushpinInfos = [];
        pushpinInfos[0] = { 'lat': 52.4982, 'lng': -2.581, 'title': 'Address 1', 'description': 'Some Text' };
        pushpinInfos[1] = { 'lat': 52.5012, 'lng': -2.570, 'title': 'Address 2', 'description': 'Some Text' };
        pushpinInfos[2] = { 'lat': 52.4994, 'lng': -2.578, 'title': 'Address 3', 'description': 'Some Text' };
   
        var infoboxLayer = new Microsoft.Maps.EntityCollection();
        var pinLayer = new Microsoft.Maps.EntityCollection();
        var apiKey = "<api key>";
   
        var map = new Microsoft.Maps.Map(document.getElementById("map"), { credentials: '<api key>' });
        // Create the info box for the pushpin
        pinInfobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), { visible: false });
        infoboxLayer.push(pinInfobox);
   
        var locs = [];
        for (var i = 0 ; i < pushpinInfos.length; i++) {
            locs[i] = new Microsoft.Maps.Location(pushpinInfos[i].lat, pushpinInfos[i].lng);
            var pin = new Microsoft.Maps.Pushpin(locs[i]);
            pin.Title = pushpinInfos[i].title;
            pin.Description = pushpinInfos[i].description;
            pinLayer.push(pin);
            Microsoft.Maps.Events.addHandler(pin, 'click', displayInfobox);
        }
   
        map.entities.push(pinLayer);
        map.entities.push(infoboxLayer);
   
        var bestview = Microsoft.Maps.LocationRect.fromLocations(locs);
        map.setView({ center: bestview.center, zoom: 14 });
    }
   
    function displayInfobox(e) {
        pinInfobox.setOptions({ title: e.target.Title, description: e.target.Description, visible: true, offset: new Microsoft.Maps.Point(0, 25) });
        pinInfobox.setLocation(e.target.getLocation());
    }
    </script>
    <script src="">ecn.dev.virtualearth.net/.../mapcontrol.ashx type="text/javascript" charset="UTF-8"></script>
    <meta><meta></head><body onload="GetMap();" onfocusout="parent.setEmailRange();" style="overflow-wrap: break-word;">
        <div id="map" style="position: relative; width: 800px; height: 650px;"></div>
    </body></html>
I have the same question (0)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Nagaraju_Matta Profile Picture

Nagaraju_Matta 123

#2
Hamza H Profile Picture

Hamza H 96 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans