Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Vendor and DirParty Table

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....

Categories:
  • 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,160 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 10,684 Moderator on at
    RE: Vendor and DirParty Table

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

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans