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)
Answered

Relation between purchline,VENDINVOICETRANS VENDPACKINGSLIPTRANS

(0) ShareShare
ReportReport
Posted on by

I am not able to determine the relationship between these tables. I am getting duplicates. please help

if i can join VENDINVOICETRANS and VENDPACKINGSLIPTRANS . That would be great as well.

FROM dbo.PURCHLINE pl
LEFT OUTER JOIN dbo.VENDINVOICETRANS vt
           on pl.PURCHID = vt.ORIGPURCHID
         AND pl.ITEMID = vt.ITEMID
        AND pl.INVENTDIMID = vt.INVENTDIMID
LEFT OUTER JOIN dbo.VENDPACKINGSLIPTRANS vp
         AND pl.PURCHID = vp.ORIGPURCHID
        AND pl.ITEMID = vp.ITEMID
       AND pl.INVENTDIMID = vp.INVENTDIMID

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,030 Super User 2025 Season 2 on at

    Hi,

    The best link would be the field InventTransId. This is unique per line combination. It is possible that you have one or more packing slip lines or invoice lines for a single purchase order line as it is possible to work with partial deliveries and invoicing.

  • Community Member Profile Picture
    on at

    thanks for your reply. DO you think I can join VENDINVOICETRANS and VENDPACKINGSLIPTRANS on quantities? because for each purchaseline and inventransid combination there are two records each in VENDINVOICETRANS  and VENDPACKINGSLIPTRANS and i have no way of knowing which  record in VENDINVOICETRANS  should be joined to VENDPACKINGSLIPTRANS  as the only think common i see is the qty. I appreciate your help. I am just getting started on AX.

  • Community Member Profile Picture
    on at

    while select vendPackingSlipTrans

           index hint TransIdIdx

           join inventTrans

               where vendPackingSlipTrans.InventTransId     == vendInvoiceTrans.InventTransId    &&

                     inventTrans.InventTransId              == vendPackingSlipTrans.InventTransId &&

                     inventTrans.PackingSlipId              == vendPackingSlipTrans.PackingSlipId &&

                     inventTrans.InvoiceId                  == vendInvoiceJour.InvoiceId

  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    You likely want the table VENDINVOICEPACKINGSLIPQUANTITYMATCH, which is used by three way matching to link VENDINVOICETRANS to VENDPACKINGSLIPTRANS with respect to quantity.

  • Muddassirahmed035 Profile Picture
    5 on at

    Hi memphisguy,

    VENDINVOICEPACKINGSLIPQUANTITYMATCH is the system defined table which contains the relation for VENDINVOICETRANS and VENDPACKINGSLIPTRANS and it works.

    Please give your response if it helps you.

    Thanks!

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