static void CompanyAddress(Args _args)
{
CompanyInfo companyInfo;
LogisticsPostalAddress postalAddress;
DirPartyLocation partyLocation;
LogisticsLocationRole locationRole;
DirPartyLocationRole partyLocationRole;
LogisticsEntityPostalAddressView postalAddressView;
while select companyInfo
where companyInfo.DataArea == curext()
join partyLocation
where partyLocation.Party == companyInfo.RecId
join postalAddress
where postalAddress.Location == partyLocation.Location
join partyLocationRole
where partyLocationRole.PartyLocation == partyLocation.RecId
join locationRole
where partyLocationRole.LocationRole == locationRole.RecId
&& locationRole.Name == strFmt("%1",logisticsLocationRoleType::Delivery)
{
info(strFmt("Purpose: %1, IsPrimary: %2, Address %3",locationRole.Type, partyLocation.IsPrimary, postalAddress.Address));
}
}
{
CompanyInfo companyInfo;
LogisticsPostalAddress postalAddress;
DirPartyLocation partyLocation;
LogisticsLocationRole locationRole;
DirPartyLocationRole partyLocationRole;
LogisticsEntityPostalAddressView postalAddressView;
while select companyInfo
where companyInfo.DataArea == curext()
join partyLocation
where partyLocation.Party == companyInfo.RecId
join postalAddress
where postalAddress.Location == partyLocation.Location
join partyLocationRole
where partyLocationRole.PartyLocation == partyLocation.RecId
join locationRole
where partyLocationRole.LocationRole == locationRole.RecId
&& locationRole.Name == strFmt("%1",logisticsLocationRoleType::Delivery)
{
info(strFmt("Purpose: %1, IsPrimary: %2, Address %3",locationRole.Type, partyLocation.IsPrimary, postalAddress.Address));
}
}
No comments:
Post a Comment