web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Get LogisticsElectronicAddress( phone, url) based on LogisticsPostalAddress and location roles

(0) ShareShare
ReportReport
Posted on by 335

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.

I have the same question (0)
  • GirishS Profile Picture
    27,827 Moderator on at

    Hi PriyaDutta,

    Try using DirPartyPostalAddressView and DirPartyContactInfoView to get address and contact details.

    Thanks,

    Girish S.

  • PriyaDutta Profile Picture
    335 on at

    Hi Girish,

    Will this fetch contact information from  Organizations >LegalEntities > Addresses >Moe options>Advanced 

    Each address (business and headcompany) has different contact information inside above path .

    pastedimage1672837167848v1.png

    As I can see my contact information here but not in the DirPartyContactInfoView.

    Is there a way to fetch contact info for each address from above path ?

    Thanks.

  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at

    Refer to the view named "LogisticsContactInfoView" - In that you need to map the postal address Location to ParentLocation field on that view to get the contact information against the address location.

    Thanks,

    Girish S.

  • PriyaDutta Profile Picture
    335 on at

    Hi Girish,

    Thanks . This worked for me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans