Zoeken in deze blog

maandag 3 januari 2011

Adding Bing Maps to Dynamics CRM 2011

If you want to show, for example, the location of an account in Bing Maps, you have to make the following customizations in Dynamics CRM 2011:

First make an IFRAME on the Account Form, something like this:

After that, add some JavaScript to your page. Make sure it is activated on the OnLoad event.

function ShowBingMap()
{
if (Xrm.Page.getAttribute("address1_line1").getValue() != null)
{
var strURL = ("http://www.bing.com/maps/default.aspx?where1=" + Xrm.Page.getAttribute("address1_line1").getValue() + "," + Xrm.Page.getAttribute("address1_city").getValue());
Xrm.Page.getControl("IFRAME_TEST").setSrc(strURL);
}
else
{
Xrm.Page.getControl("IFRAME_TEST").setSrc("about:blank");
}
}

After these modifications your Form should look something like this:

Geen opmerkingen:

Een reactie posten