web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

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

(1) ShareShare
ReportReport
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.
I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    305,583 Super User 2026 Season 1 on at
    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 635 Super User 2026 Season 1

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 635 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 547

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans