Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Vendor and DirParty Table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

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

    perfect thank you!

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

    DirPartyLocation.Location == LogisticsLocation.RecId

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

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

  • ScorpioDax Profile Picture
    ScorpioDax 331 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
    startax 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
    ScorpioDax 331 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
    Keshav Kumar 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
    5400 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
    nunomaia 9 Super User 2024 Season 1 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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,661 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans