Autonumber columns
A string column with format Text can carry an AutoNumberFormat (SDK CreateAttribute/UpdateAttribute, the attributes
of CreateEntity including the primary name, POST EntityDefinitions(...)/Attributes, solution import and export, and
autoNumberFormat in the schema YAML, on a column or on primaryName). Placeholders: {SEQNUM:n} (a sequence, zero
padded to at least n digits, that keeps growing past n), {RANDSTRING:n} (n upper-case letters and digits, n from 1 to 6)
and {DATETIMEUTC:format} (the UTC time in a .NET date and time format); the rest of the text is copied as is.
- When values are made. On
Create, each autonumber column that the request leaves without a value (absent, null or empty) gets one; a value the caller gives is kept.Updatenever generates, and rows that exist when a column becomes autonumber are not filled. - Checks. As in Dataverse, the placeholders are not checked when the column is created or changed: the
Createof a record fails with 400 when the format is not valid (an unknown placeholder,RANDSTRINGoutside 1..6,SEQNUMbelow 1, a date format .NET refuses, or more than oneSEQNUM, which xrmverse refuses rather than guess). A generated value longer than the column'sMaxLengthis a 400, never truncated. A format on a column that is not a Text string column is a 400. - The sequence. Each column has a SQL Server
SEQUENCE([autonumber].[<column metadata id>]) that starts at 1000. A value taken by aCreatethat then fails is not given back, so the numbering can have gaps, as in Dataverse. Changing the format keeps the sequence; an empty format removes it; deleting the column or its table drops it. - Seed messages.
SetAutoNumberSeed(EntityName,AttributeName,Value;prvWriteAttribute; Web APIPOST SetAutoNumberSeed, 204) restarts the sequence atValue.GetAutoNumberSeed(AutoNumberSeedValue: the last seed set, 1000 by default) andGetNextAutoNumberValue(NextAutoNumberValue) are open to every organization member; Web APIGET GetAutoNumberSeed(EntityName='…',AttributeName='…')andGET GetNextAutoNumberValue(…). As in Dataverse, the seed is not part of a solution.
The points that only a real Dataverse can confirm are in
docs/superpowers/acceptance/autonumber-checklist.md.