Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

[INFO] There are gaps in the sequence numbers of the posted sales/purchase documents, some explanations

Posted on by 1,657

Let’s show the issue.

I have the fresh Business Central (BC) tenant (14.0, online version) in my hands.

I use default set for Number Series:

GapsReport00.png

Go to ‘Item Card’ (1925-W), set

- “Prevent Negative Inventory” = yes

:

GapsReport01.png

Create new ‘Sales Invoice’

Header:

- Customer = 10000

Line:

- Item = 1925-W

- Quantity = 1

Try to post, as result error:

“You have insufficient quantity of Item 1925-W on inventory.”

:

GapsReport02.png

GapsReport03.png

Check that in the document (unposted document) we could see “Posting No.” = 103215

// use Page Inspection feature (this is the new feature for 14.x version)

GapsReport04.png

GapsReport05.png

GapsReport06.png

You can see 2 key fields in Sales Header (36) table:

“Posting No.” (63) [use for Posted Sales Invoice]; “Shipping No.” (62) [use for Posted Sales Shipment]

// for Purchase side similar story - Purchase Header (38) table:

// “Posting No.” (63) [use for Posted Purchase Invoice]; “Receiving No.” (62) [use for Posted Purchase Receipt]

 

Why system work like this?

---

This is an old system behavior.

My personal understanding (based on some old support cases):

‘Next No’ from Series is got at the beginning of posting instead of ending.

This is done for multiple / partial posting and to be sure that in case of two or more simultaneously posting

at the same time there won't No Series intersections between different documents.

 

The issue has been discussed before and DEV team aware about this story.

 

Now I see a new round of the discussion in this Idea:

https://experience.dynamics.com/ideas/idea/?ideaid=be8f5c48-4955-e911-b047-0003ff68d113

---

 

Let’s continue. Let’s create a gap.

 

 

Create new ‘Sales Invoice’

Header:

- Customer = 10000

Line:

- Item = 1980-S

- Quantity = 2

Post

:

GapsReport07.png

Go to ‘Posted Sales Invoice’

We could see a gap

:

GapsReport08.png

Key moment that if we Post the document (document has “Posting No.” <> ‘’) or Delete the document then we close the gap.

 

But wait a bit and now I show how to find the potential gaps –

 

A user can filter the document list where “Posting No.” is <>’’. That will provide the documents with Posting No.

:

GapsReport09.png

GapsReport10.png

GapsReport11.png

Another option is to run the table from the link and get the data there

// For direct connect to the table just manually add parameter “?table=36” to your link

:

GapsReport12.png

GapsReport13.png

Now, we ready to show what happen if delete the document (document has “Posting No.” <> ‘’)

// you could also close the gap if Post the document (102222)

:

GapsReport14.png

GapsReport15.png

// message: Deleting this document will cause a gap in the number series …

GapsReport16.png

// message: One or more related posted documents have been generated during deletion to fill gaps in the posting number series …

GapsReport17.png

 

GapsReport18.png

// system create 'an empty document with the only text line "deleted document"' 103215 - as result no gap

 

The same story for Posted Sales Shipment

:

GapsReport19.png

 

GapsReport20.png

 

My example based on Sales scenario (table 36), but you could apply this for Purchase scenario too (table 38).

 

P.S.

General useful link (maybe): [INFO] Useful links https://community.dynamics.com/business/f/758/t/307965

Categories:
  • Verified answer
    RE: [INFO] There are gaps in the sequence numbers of the posted sales/purchase documents, some explanations

    Good post!

  • Suggested answer
    Alexey Finogenov Profile Picture
    Alexey Finogenov 1,657 on at
    RE: [INFO] There are gaps in the sequence numbers of the posted sales/purchase documents, some explanations

    no need answer

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... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans