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)

PURCHLINE VS INVENTTRANS RELATION

(0) ShareShare
ReportReport
Posted on by

Hello, is everyline of purchline table have supposed to have a corresponding line on inventtrans table? 

The standart relation is :

purchline.inventtransid -> inventtransorigin.inventtransid -> inventtransorigin.recid -> inventtrans.inventtransorigin

or as in sql:

SELECT *
FROM dbo.PURCHLINE AS P
LEFT JOIN dbo.INVENTTRANSORIGIN AS I ON I.INVENTTRANSID = P.INVENTTRANSID
LEFT JOIN dbo.INVENTTRANS AS T ON T.INVENTTRANSORIGIN = I.RECID

I'm looking for some data corruption so i have to know if this structure is correct.

Regards.

*This post is locked for comments

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

    Hi,

    This is correct. At creation of the PO line it creates the inventtrans origin and an inventtrans record. Note that due to e.g. partly delivery there can be more than ome inventtrans record related to the inventtrans origin.

  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    Correct You can use it ,

    also you can use InventTable  AS The InventTable table contains information about items.

    Query will be like:

    SELECT ID.RECID,P.RECID,PL.RECID, P.DATAAREAID,P.PURCHID,PL.DATAAREAID,PL.PURCHID , PL.INVENTDIMID , ID.INVENTLOCATIONID,pl.PURCHSTATUS   FROM PurchLine PL

    INNER JOIN PurchTable P ON P.PURCHID=PL.PURCHID

    INNER JOIN INVENTTABLE IT ON IT.ITEMID   = PL.ITEMID

       INNER JOIN INVENTITEMGROUPITEM ITG ON ITG.ITEMDATAAREAID = IT.DATAAREAID AND ITG.ITEMID = IT.ITEMID

    INNER JOIN INVENTDIM ID ON ID.INVENTDIMID = PL.INVENTDIMID

  • Community Member Profile Picture
    on at

    Thanks, now as part 2, if those records in inventtrans table do not exist, how can I recreate them?

  • André Arnaud de Calavon Profile Picture
    301,130 Super User 2025 Season 2 on at

    Hi Sin5k4,

    Can you indicate if the missing inventtrans records are related to items which are setup as service or the tick box Stocked product on the inventory model group is not enabled?

  • Community Member Profile Picture
    on at

    Hello,unfortunately all these items are stocked products :(

  • André Arnaud de Calavon Profile Picture
    301,130 Super User 2025 Season 2 on at

    Hi Sin5k4,

    You can try to set the Purchase order to the type of Journal. Save the record and then put back to type Purchase order. This Purchase type field is on the purchase order header.

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