Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Get a list of serial n...
Finance forum
Answered

Get a list of serial numbers associated with items from production order

Posted on by 9
Hi there. I have a requirement for D365 Finance and Operations that requires some X++ code to be written for the following scenario.
Given a production order whose status has changed to "Reported as Finish", how can I retrieve a list of items that were created and are now in inventory as well as include the serial number of each item that was assigned to the item when the production order was reported as finish.
 
With a production order ID, I am trying to understand which tables need to be queried to get the list of items and their associated serial numbers.
 
I have code that triggers when the status is changed to "Reported as Finish" but could use some direction on the best way to query for the needed data.
 
Thank you.
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,652 Super User 2024 Season 2 on at
    Get a list of serial numbers associated with items from production order
    Hi jgoyne,
     
    The production order table has a field called InventTransID (Lot ID). Using this value, you can find records in the table InventTrans. Using the status field you can check if the quantities were reported as finished or still pending. The field InventDimId on each record refers to a record in the InventDim table where you can find the related serial number.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

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,652 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,930 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans