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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...

Auto assign lot no. for released production order lines

(5) ShareShare
ReportReport
Posted on by 268
Hello, can someone please provide some guidance on how to write the procedure for auto-assigning lot no. for released production order lines? 
 
 
 
 
I tried to follow the same procedures in the link below and adjust the code so that it checks the production order line instead of purchase line.
 
However, the lot no. did not get assigned on the item tracking lines page even though it got created in the reservation entry table.
 
 
 
Your help would be greatly appreciated! Thank you.
I have the same question (0)
  • Suggested answer
    Dhiren Nagar Profile Picture
    2,876 Super User 2026 Season 1 on at
     
    There is a slight different when you do Item tracking or create reservation entries for Purchase and for Production Order Line.
     
    Try following:
    Source Type = 5406
    Source Subtype = 3
    Source ID = Prod. Order No.
    Source Ref No. = 0
    Source Prod. Order Line = Line Number of the output item, default is 10000 for first line.
     
    I think changing the code slightly based on above parameter will solve the issue.
    Please note that system has different ways of creating tracking and reservation for different source and demand documents.
    You can check codeunit Item Jnl. Line-Reserve as reference to learn more about source.
     
    Regards,
    Dhiren.
  • Suggested answer
    OussamaSabbouh Profile Picture
    11,500 Super User 2026 Season 1 on at
    Hello,
     
    This happens because Released Production Orders don’t use Reservation Entry directly to drive Item Tracking Lines: even though your lot is created in Reservation Entry, the Item Tracking Lines page only shows data created via Tracking Specification handled by Item Tracking Management. The purchase-order pattern you followed (like Yun Zhu’s example) doesn’t fully apply to production output. For production, the correct approach is to hook into the production output / journal flow and use ItemTrackingMgt APIs (Init/Insert Tracking Specification or CreateTrackingLines), not manual Reservation Entry inserts—once tracking specs are created properly, the Lot No. will appear automatically on the Item Tracking Lines page.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    AK-13051749-0 Profile Picture
    268 on at
    Thank you!
     
    I was missing the Source Prod. Order Line = Line No. of the output item earlier. After adding that, the lot no. is now getting assigned automatically.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    21,573 Super User 2026 Season 1 on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans