Hi Master
I have a problem to get a warehouse Address (Street, City, State). This is my code to find Warehouse Address, I have tried but when did select LogisticsPostalAddress not find. after I check the relationship between LogisticsPostalAddress.Location and LogisticsLocation.Regid correct?
static void Warehouse(Args _args)
{
str Warehouse;
//LogisticsElectronicAddress LogisticsElectronicAddress;
LogisticsLocation LogisticsLocation;
InventLocationLogisticsLocation InventLocationLogisticsLocation;
InventLocation InventLocation;
LogisticsPostalAddress LogisticsPostalAddress;
;
Warehouse = “02001”;
InventLocation = InventLocation::find(Warehouse);
Select firstOnly InventLocationLogisticsLocation
where InventLocationLogisticsLocation.InventLocation == InventLocation.RecId;
if (InventLocationLogisticsLocation)
{
select firstOnly LogisticsLocation
where LogisticsLocation.ParentLocation == InventLocationLogisticsLocation.Location;
if (LogisticsLocation)
{
select firstOnly LogisticsPostalAddress
where LogisticsPostalAddress.Location == LogisticsLocation.RecId;
if(LogisticsPostalAddress)
{
info(strFmt("%1", LogisticsPostalAddress.Street));
}
}
}
}
can somebody help me ?
Thanks,
Pranyoto