public LogisticsElectronicAddress getElectronicAddressByPostalAddress(InventLocation _inventLocation, LogisticsElectronicAddressMethodType _type)
{
LogisticsLocation logisticsLocation;
InventLocationLogisticsLocation inventLocationLogisticsLocation;
LogisticsElectronicAddress LogisticsElectronicAddress;
select firstOnly RecId from inventLocationLogisticsLocation
where inventLocationLogisticsLocation.InventLocation == _inventLocation.RecId
join RecId from logisticsLocation
where logisticsLocation.ParentLocation == inventLocationLogisticsLocation.Location;
LogisticsElectronicAddress = LogisticsElectronicAddress::findByLocationAndType(logisticsLocation.RecId, _type);
return LogisticsElectronicAddress;
}