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 :
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)
  • Suggested answer
    nunomaia Profile Picture
    25 Moderator on at

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

  • Suggested answer
    5400 Profile Picture
    7,162 on at

    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.

  • Keshav Kumar Profile Picture
    220 on at

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

    Dirpartytable.Recid==Vendtable.party.

  • ScorpioDax Profile Picture
    333 on at

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

  • Suggested answer
    startax Profile Picture
    1,845 on at

    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

    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;

    }

  • ScorpioDax Profile Picture
    333 on at

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

  • axk Profile Picture
    925 on at

    DirPartyLocation.Location == LogisticsLocation.RecId

  • ScorpioDax Profile Picture
    333 on at

    perfect thank you!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans