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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Vendor Details

(0) ShareShare
ReportReport
Posted on by 2

Hi,

    I want to join vendor name and vendor address/contact details 

I could see the Vendor Details in the VendTable .

And When I checked in LogisticsElectronicAddress table ,I dont see any fields inorder to join with VendTable   

What will be the Key field to join VendTable with Address(Table). Also can some Mention the exact name regarding the Address Table?

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,647 Most Valuable Professional on at

    I could tell you straight away how the relation is implemented, but let me show you how you can find the answer by yourself.

    Open VendTable table in the designer. Put address to the search box above, which means that only fields and methods containing "address" in their names will be shown. postalAddress() method looks promising, therefore open it. You'll see this code:

    LogisticsPostalAddress postalAddress()
    {
        return DirParty::primaryPostalAddress(this.Party);
    }

    As you see, the Party field is crucial here. There is a generic concept of a party (customer, vendor, worker, legal entity...) and addresses are linked to parties, not the specific role of a party (such as a vendor).

    Now look into primaryPostalAddress():

    server static LogisticsPostalAddress primaryPostalAddress(
        DirPartyRecId _partyRecId,
        TransDateTime _transDateTime = DateTimeUtil::utcNow())
        {
            LogisticsPostalAddress postalAddress;
            DirPartyLocation partyLocation;
    
            select firstonly postalAddress
                exists join partyLocation
                where partyLocation.Location == postalAddress.Location
                   && partyLocation.IsPrimary == true
                   && partyLocation.Party == _partyRecId;
    
            return postalAddress;
        }

    This gives you the remaining details. There is another generic concept of a location, which we don't need to worry about too much here. We see that a party is linked to a location via DirPartyLocation table, and we can directly join this table with LogisticsPostalAddress.

    Note that a party can have more than one address. This method gives you the primary one, which is usually what you want if you don't have any specific requirements.

    Regarding contact details, do the same excercise for phone() method, for example.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi NoobGamer,

    The relation is with DirPartyTable. You can link DirPartyTable wirth VendTable based on party field (DirPartyTable.RecId == VendTable.Party).  

    LogisticsElectronicAddress is linked to DirPartyTable based on PrivateForParty field (LogisticsElectronicAddress.PrivateForParty == DirPartyTable.RecId).

    You can find the relation to Address tables using the DirPartyTable as well.

  • NoobGamer Profile Picture
    2 on at

    Hi ,

         The Below Query works for me . 

    select v.ACCOUNTNUM,D.ADDRESS,* from VENDTABLE v
    join DIRPARTYPOSTALADDRESSVIEW D on v.PARTY = d.PARTY
    where v.ACCOUNTNUM='1001' and v.DATAAREAID='USMF'

  • Martin Dráb Profile Picture
    239,647 Most Valuable Professional on at

    Just don't forget that this query may return multiple addresses. If you just take the first one, it may be wrong. First of all, you should think about which address you need - the primary one, the address used for delivery or so.

    Also, if you just take the first one that the database server returns, you may potentially get different addresses on different executions.

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,878 Super User 2026 Season 1 on at

    Hi NoobGamer ,

    You can use "PARTYNUMBER" to find all addresses that are related to a vendor from following entities via Data management,

    pastedimage1652899986672v1.png

  • NoobGamer Profile Picture
    2 on at

    Sure Martin .I will check that and whether there is any function to pick the different kind of address ?  

  • NoobGamer Profile Picture
    2 on at

    Hi Alireza Eshaghzadeh,

                           May I know what is Data Management and how to navigate to that ?

  • Martin Dráb Profile Picture
    239,647 Most Valuable Professional on at

    NoobGamer, you can put such questions to a search engine to find answers by yourself, without having to waiting for others. Here is the main documentation page: Data management overview.

    In F&O, go to a workspace called Data management. You can also use the search functionality in F&O to find it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 699

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 582 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 493

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans