Google Maps integration

Place the code in the on load event, change the address fields to your applicable fields, populate the country field if not defaulted with teh right country and then update the iframe source details. You make want to add a checkbox on the map tab to control when the below code is applied to the iframe as you do not want the map loading everytime you open up your record (slows down the loading of the record). Happy Mapping!!



var LiveSearchURL = "";



                switch (crmForm.FormType)


                                case CRM_FORM_TYPE_CREATE:

                                                // Point to the Microsoft Live Search home page when creating an account

                                                LiveSearchURL = "";  


                                 case CRM_FORM_TYPE_UPDATE:

                                               // Use Live search with this account’s name

                                                LiveSearchURL =;

                                                // Encode the account name and add it to the search string

                                                                LiveSearchURL += crmForm.all.address2_line1.DataValue;

                                                LiveSearchURL += " ";

                                                                LiveSearchURL += crmForm.all.address2_line2.DataValue;

                                                                LiveSearchURL += " ";

                                                                LiveSearchURL += crmForm.all.address2_city.DataValue;

                                                                LiveSearchURL += " ";

                                                                LiveSearchURL += crmForm.all.address2_country.DataValue;





// Set the IFRAME’s URL

crmForm.all.IFRAME_MAP.src = LiveSearchURL;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s