{"title":"NumberSequence data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/numbersequence/numbersequence-data-type/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/numbersequence/numbersequence-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/numbersequence/numbersequence-data-type","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Is a complex data type for creating and managing number sequences in the database.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Static methods","slug":"static-methods","at":143,"chars":1203},{"level":2,"title":"Related information","slug":"related-information","at":1346,"chars":171}],"text":"> Version: _Available or changed with runtime version 4.0._\nIs a complex data type for creating and managing number sequences in the database.\n## Static methods\nThe following methods are available on the NumberSequence data type.\nMethod name|Description\nCurrent(Text [, Boolean])<numbersequence-current-method>|Gets the current value from the number sequence, without doing any increment. The value is retrieved out of transaction. The value will not be returned on transaction rollback.\nDelete(Text [, Boolean])<numbersequence-delete-method>|Deletes a specific number sequence.\nExists(Text [, Boolean])<numbersequence-exists-method>|Checks whether a specific number sequence exists.\nInsert(Text [, BigInteger] [, BigInteger] [, Boolean])<numbersequence-insert-method>|Creates a number sequence in the database, with the given parameters.\nNext(Text [, Boolean])<numbersequence-next-method>|Retrieves the next value from the number sequence.\nRange(Text, Integer [, Boolean])<numbersequence-range-string-integer-boolean-method>|Retrieves a range of values from the number sequence.\nRange(Text, Integer, var BigInteger [, Boolean])<numbersequence-range-string-integer-biginteger-boolean-method>|Retrieves a range of values from the number sequence.\nRestart(Text [, BigInteger] [, Boolean])<numbersequence-restart-method>|Restarts a number sequence.\n## Related information\nUsing number sequences<../../devenv-number-sequences>\nGet atarted with AL<../../devenv-get-started>\nDeveloping extensions<../../devenv-dev-overview>"}