Skip to main content

Posts

Showing posts with the label Number Series Generation

Generate Number Series from one Company and use it in another company

Introduction: When dealing with Number Series where the Intercompany Documents are created automatically using the code, using standard number series generation Codeunits cause problems. In this blog, I'll be explaining why this issue is caused and how to resolve such issues. Pre-requisites: Microsoft Dynamics NAV / Business Central  VS Code  AL Language Extension Solution: Issue: Let's say I'm logged in as user of Company B. When I create Sales Order in current company, I need to create Purchase Order in target company say Company A. When I use the Number Series declared on Company B's Purchase and Payable Setup for Purchase Order, the system either gives an error that Number Series does not exist or number generated is out of sync as Number Series are stored on Per Company basis. This results in overlapping of next PO number to be generated. Cause of the Issue: NoSeriesManagement Codeunit 396 works only with the No. Series for the cu