Tuesday, 22 January 2019

warehouse address x++

static void warehoseAddress(Args _args)
{
SalesTable salesTable = SalesTable::find(‘SO-000834’);
InventLocation inventLocation;
LogisticsEntityPostalAddressView postalAddressView;
LogisticsElectronicAddress electronicAddress;
LogisticsLocation contactLocation;

inventLocation = inventLocation::find(salesTable.InventLocationId);
if (inventLocation)
{
select firstonly postalAddressView
where postalAddressView.Entity == inventLocation.RecId
&& postalAddressView.EntityType == LogisticsLocationEntityType::Warehouse
&& postalAddressView.isPrimary == NoYes::Yes;

if (postalAddressView)
{
/*select firstOnly electronicAddress where electronicAddress.Type == LogisticsElectronicAddressMethodType::Phone
join contactLocation where contactLocation.ParentLocation == postalAddressView.Location
&& contactLocation.RecId == electronicAddress.Location;*/

info(strFmt(“wharehouse address : %1”,postalAddressView.Address));
}
}
}

No comments:

Post a Comment