Hi, this is not a bug. The No. field is Code, and Code is text, so it sorts character by character, not as a number. 200195 lands before 20200 because on the third character you have 0 against 2.
As long as every number has the same amount of digits it sorts the way people expect, that's why the standard series keep a fixed pattern.
For the ones already created there's not much, you can't renumber posted documents. If the sorting really hurts users, a small extension with an integer field filled from the No. and the list sorted on that would work. Not pretty, but it does the job.
Glad to help - follow up if anything is unclear.
â–º If this solved it, marking it verified helps others too.
Regards,
Grigorios Mavrogeorgis
Business Central Consultant & AL Developer
Work: Gmsoft Limited
Blog: insidebusinesscentral
LinkedIn: linkedin.com/in/gregorymavrogeorgis