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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Vendor and DirParty Table

(0) ShareShare
ReportReport
Posted on by

Hi ...I need to extract a list of contacts for all vendors in the system.  Found the DirParty Table but could not find a way to link it with the VendTable.  What tables should I be using if these are the wrong ones? what piece of info links them together? I have checked recid but they are different....

*This post is locked for comments

I have the same question (0)
  • ScorpioDax Profile Picture
    333 on at
    RE: Vendor and DirParty Table

    perfect thank you!

  • axk Profile Picture
    925 on at
    RE: Vendor and DirParty Table

    DirPartyLocation.Location == LogisticsLocation.RecId

  • ScorpioDax Profile Picture
    333 on at
    RE: Vendor and DirParty Table

    what is the relation for the dirpartylocation and logisticslocation i cannot find the join?

  • ScorpioDax Profile Picture
    333 on at
    RE: Vendor and DirParty Table

    2018_2D00_05_2D00_31_5F00_10_2D00_24_2D00_07.jpgThanks for the help...i am getting this error though.  I also tried the code from the page you linked but how can i return and view the results?

    public container getRemittanceContacts()
    {
    container remittanceEmailAddresses;
    DirPartyTable dirParty;
    LogisticsElectronicAddress electronicAddress;
    DirPartyLocation dirPartyLoc;
    ContactPerson contactPerson;

    //find all of the vendor contact email addresses that are currently active
    while select * from contactPerson
    where contactPerson.ContactForParty == contactPerson.Party &&
    contactPerson.Inactive == NoYes::No
    join RecId from dirParty
    where dirParty.RecId == contactPerson.Party
    join Location, Type, Locator FROM electronicAddress
    EXISTS JOIN Location, Party FROM dirPartyLoc
    WHERE electronicAddress.Location == dirPartyLoc.Location && dirParty.RecId==dirPartyLoc.Party
    && electronicAddress.Type == LogisticsElectronicAddressMethodType::Email
    {
    remittanceEmailAddresses += electronicAddress.Locator;
    }
    return remittanceEmailAddresses;

    }

  • Suggested answer
    startax Profile Picture
    1,845 on at
    RE: Vendor and DirParty Table

    Hi ,

    You can try the below code for  one vendor.

    LogisticsElectronicAddress logisticsElectronicAddress;
    DirPartyTable dirPartyTable;
     
    select firstOnly logisticsElectronicAddress where logisticsElectronicAddress.RecId == DirPartyTable::findRec(VendTable::find(‘vendorAccount′).Party).PrimaryContactPhone;
     
    info(strFmt(“%1″,logisticsElectronicAddress.Description));
    For more details you can check the below link
  • ScorpioDax Profile Picture
    333 on at
    RE: Vendor and DirParty Table

    I am having trouble writing the query for this in the AOT.  Does anyone have the x++ code that can help me with this?  

  • Keshav Kumar Profile Picture
    220 on at
    RE: Vendor and DirParty Table

    First of all you need to link vendtable with dirpartytable using the relation:

    Dirpartytable.Recid==Vendtable.party.

  • Suggested answer
    5400 Profile Picture
    7,162 on at
    RE: Vendor and DirParty Table

    See, if You want to find the contact information from AX you need multiple join.

    Dirparty table having relation with vendtable with party field.

    DirPartyTable .RecId == VendTable.Party

    Now dirparty table having relation dirpartylocation and dirpartylocation having relation with logistics location table  from where you can join logisticelectronicaddress table to fetch the contact info.

  • Suggested answer
    nunomaia Profile Picture
    18 Moderator on at
    RE: Vendor and DirParty Table

    You can join on DirPartyTable .RecId == VendTable.Party

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
KP-31070522-0 Profile Picture

KP-31070522-0 3

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans