« Home | ASP.NET Application Deployment Resources » | Visual Studio Error: The project file ' ' has been... » | Progress Bar in Dynamics CRM 4.0 » | Backup, Restore & Publish Dynamics CRM Customizati... » | 'The application is already precompiled' error » | Server Explorer Gone Invisible? » | Month Name from Month Number » | Implemeting SSL in IIS 7.0 » | Maintain Scroll Position on PostBack in ASP.NET » | Offline Mode of your WebSite »

Display a Google Map for an Account

Find the below code to add google map for an account in Dynamics CRM 4.0.

Make a new tab with an iFrame, add a custom bit value (yes or no radio buttons) called "shmap" and add this code as an onchange event.


if (crmForm.all.address1_postalcode.DataValue != null){
crmForm.all.IFRAME_gmap.src = "http://maps.google.com/maps?q=" +
crmForm.all.address1_line1.DataValue + "+" + crmForm.all.address1_city.DataValue + ",+" + crmForm.all.address1_postalcode.DataValue;
}
else
{
crmForm.all.IFRAME_gmap.src = "about:blank"
}

Thanks to Glen..

Happy Coding...

Labels: , , , , ,

Post a Comment