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 7
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... 287,986 Super User 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans