Hi,
I am trying to fetch addresses and contact information based on location roles: Business /headcompany for PO report.
1.Business address is primary and I am able to get the address but cannot achieve the contact information.
2.For head company, I am not able to fetch the address either.
Please see the below code and let me know where I am gong wrong.
select firstonly postalAddress where postalAddress.Location == transTaxInformation.CompanyLocation; LogisticsElectronicAddress electronicAddress; dirPartyLocation dirPartyLocation; select dirPartyLocation where dirPartyLocation.Location == postalAddress.Location join electronicAddress where electronicAddress.Location == dirPartyLocation.Location && electronicAddress.Type == LogisticsElectronicAddressMethodType::Phone; purchPurchaseOrderHeader.NAVBillToPhone = electronicAddress.Locator; select dirPartyLocation where dirPartyLocation.Location == postalAddress.Location join electronicAddress where electronicAddress.Location == dirPartyLocation.Location && electronicAddress.Type == LogisticsElectronicAddressMethodType::URL; purchPurchaseOrderHeader.NAVBillToURL = electronicAddress.Locator; purchPurchaseOrderHeader.NAVBillTo = postalAddress.Address; purchPurchaseOrderHeader.NAVRegdAddress = LogisticsPostalAddress::findByLocation(InventSite::getLocationFromRole(InventSite::find(purchTable.InventSiteId).RecId,LogisticsLocationRoleType::HeadCompany_IT)).Address;
Please help.
Thanks.