Debug.logError(errorMessage, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentFedexCompanyPartyHasNotPostalAddress",
UtilMisc.toMap("companyPartyId", companyPartyId), locale));
}
GenericValue countryGeo = delegator.findByPrimaryKeyCache("Geo", UtilMisc.toMap("geoId", postalAddress.getString("countryGeoId")));
String countryCode = countryGeo.getString("geoCode");
String stateOrProvinceCode = null;
// Only add the StateOrProvinceCode element if the address is in USA or Canada
if (countryCode.equals("CA") || countryCode.equals("US")) {
GenericValue stateProvinceGeo = delegator.findByPrimaryKeyCache("Geo", UtilMisc.toMap("geoId", postalAddress.getString("stateProvinceGeoId")));