{"title":"AutoSplitKey Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-autosplitkey-property/","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/properties/devenv-autosplitkey-property, 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/properties/devenv-autosplitkey-property","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":"Sets whether a key is automatically created for a new record placed between the current record and the previous record.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":180,"chars":34},{"level":2,"title":"Property Value","slug":"property-value","at":214,"chars":125},{"level":2,"title":"Syntax","slug":"syntax","at":339,"chars":41},{"level":2,"title":"Remarks","slug":"remarks","at":380,"chars":980},{"level":3,"title":"Negative key values","slug":"negative-key-values","at":996,"chars":364},{"level":2,"title":"Related information","slug":"related-information","at":1360,"chars":40}],"text":"> Version: _Available or changed with runtime version 1.0._\nSets whether a key is automatically created for a new record placed between the current record and the previous record.\n## Applies to\n Request Page\n Page\n## Property Value\nTrue if the key is automatically created for the new record; otherwise, false. The default value is false.\n## Syntax\n```al\nAutoSplitKey = true;\n```\n## Remarks\nTo set this property to a value of true, the following conditions must be met:\n The current key must be the primary key.\n The last field in the primary key must be an Integer Data Type<../methods-auto/library>, BigInteger Data Type<../methods-auto/library>, GUID Data Type<../methods-auto/library>, or Decimal Data Type<../methods-auto/library> field.\nWhen AutoSplitKey is enabled, a value is automatically calculated for the last field of the primary key when a new record is inserted between two existing records. The new key value is set to a value halfway between the keys of the surrounding records.\n### Negative key values\n> APPLIES TO: Business Central 2025 release wave 1 and later\nIf a new row is inserted before the first record in the list, a negative key value may generated so that the new record sorts before all existing records. Both 0 and negative values are allowed for numeric key fields, though AutoSplitKey doesn't currently generate 0 as a value.\n## Related information\ndevenv-properties"}