This project is read-only.
4
Vote

Address Null Error

description

I get an error for this when an account or contact does not have an address assigned.
"Geocode was not successful for the following reason: Zero Results"
Is there a way to put an is null check in place or to limit any errors that are returned?
 
Thanks,
 
Josh

comments

Solarflair wrote Oct 19, 2012 at 9:54 AM

I get this error too. Is there a way to suppress this?

We need more detailed instructions on runing this please , and source code to be made available for download if possible.

wrote Nov 22, 2012 at 9:15 AM

wrote Dec 3, 2012 at 2:05 PM

liorabel wrote Dec 3, 2012 at 2:11 PM

I currently rated this solution with 2 stars. I'd be happy to rate it as 5 if this error gets fixed.

Solarflair wrote Dec 17, 2012 at 11:47 AM

I overcame a similar issue (for BING mapping) by handling the null fields within the code... returning nothing if there was a blank address. Perhap you could adapt this?

mapIframe = function() {
    var engine = "http://www.bing.com/maps/default.aspx?where1="; 
    var address =buildaddress("address1_line1")  +  buildaddress("address1_line2")  +  buildaddress("address1_line3") +  buildaddress("address1_city") + buildaddress("address1_postalcode") +  buildaddress("nam_country", true);
    //for birds eye view 
    //address += "&style=b"; 
Xrm.Page.getControl("IFRAME_map").setSrc(engine + address);

}

function buildaddress(fieldname, optionbased) {

if(typeof optionbased == 'undefined') {
addrval = Xrm.Page.getAttribute(fieldname).getValue();
}else{
addrval = Xrm.Page.getAttribute(fieldname).getText();
}

if (addrval != null && addrval.length > 1)
{ return addrval.replace(/ /gi, "%20") + ",%20"; }
else{return ""}
}

propertyOnLoad = function(){ mapIframe(); }

wrote Feb 14, 2013 at 7:12 PM