Skip to content

Commit c6d372d

Browse files
committed
docs(spec): every door refuses the dynamic roll-ups the currency page names; regenerate spec artefacts
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nU2dZbC2HWMg47r4D
1 parent 815524a commit c6d372d

6 files changed

Lines changed: 20 additions & 14 deletions

File tree

‎content/docs/data-modeling/currency.mdx‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,14 @@ that column. A `count` column never carries `currencyField`. See the
258258
`currencyMode`) is admitted only for a `sum`, `avg`, `min` or `max` of a stored home
259259
amount, a child field that a `homeAmount.field` on the child object names (see
260260
[Totals in the home currency](#totals-in-the-home-currency)), and naming no currency
261-
code. `defineStack` (`os validate` and the build) refuses one over any other
262-
child field, naming the child's home amounts. A single-object save or publish through the
263-
metadata API on a running server does not judge the child field yet: it parses the one
264-
object, so it refuses only what that object shows (#33713). The object itself refuses
265-
one that names no child field, one that names a currency code, and a `count` in
266-
every mode, at every door.
261+
code. One over any other child field is refused, naming the child's home amounts:
262+
`defineStack` (`os validate` and the build) refuses it, and on a running server a save or
263+
publish through the metadata API refuses it with **`INVALID_METADATA` / 422** and the
264+
same message, whichever object is saved second, judging each object as the server serves
265+
it, extensions included. A `homeAmount` makes a field a home amount only where it is
266+
valid as declared, so an extension cannot make a plain number one by naming it. The
267+
object itself refuses one that names no child field, one that names a currency code, and
268+
a `count` in every mode, at every door.
267269
- **A dataset measure that declares `currency` over a record-mode amount** is refused at
268270
compile with **`DATASET_INVALID` / 400**, and so is a `currency` on a derived measure that
269271
sums record-mode amounts. One code cannot label amounts in several currencies: delete
@@ -472,9 +474,9 @@ actual_cost: {
472474
The Console then draws the total in `localization.currency` on the record page and in the
473475
list cell (`$250.00` under a USD home currency, `CN¥1,800.00` under CNY), the same currency
474476
a dashboard metric over `amount_home` shows. Without the declaration the roll-up stays a
475-
bare number. `defineStack` (`os validate` and the build) refuses `dynamic` on any other
476-
roll-up, because the amounts it reads are not known to be in the home currency; a
477-
single-object save on a running server does not check that yet (#33713, see
477+
bare number. `dynamic` on any other roll-up is refused, because the amounts it reads are
478+
not known to be in the home currency: by `defineStack` (`os validate` and the build), and
479+
by a save or publish through the metadata API on a running server (see
478480
[Roll-ups and datasets](#roll-ups-and-datasets)).
479481
480482
## See also

‎content/docs/references/data/field.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const result = CurrencyConfigSchema.parse(data);
102102
| **summaryOperations** | `{ object: string; field?: string; function: Enum<'count' \| 'sum' \| 'min' \| 'max' \| 'avg'>; relationshipField?: string; … }` | optional | Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted. |
103103
| **language** | `string` | optional | Programming language for syntax highlighting (e.g., javascript, python, sql) |
104104
| **step** | `number` | optional | Step increment for slider (default: 1) |
105-
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused. Absent: dynamic mode, and no currency on a summary. |
105+
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused, by `defineStack` and by a single-object save or publish on a running server alike. Absent: dynamic mode, and no currency on a summary. |
106106
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
107107
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
108108
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |

‎content/docs/references/data/object.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ const result = ApiMethod.parse(data);
279279
| **summaryOperations** | `{ object: string; field?: string; function: Enum<'count' \| 'sum' \| 'min' \| 'max' \| 'avg'>; relationshipField?: string; … }` | optional | Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted. |
280280
| **language** | `string` | optional | Programming language for syntax highlighting (e.g., javascript, python, sql) |
281281
| **step** | `number` | optional | Step increment for slider (default: 1) |
282-
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused. Absent: dynamic mode, and no currency on a summary. |
282+
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused, by `defineStack` and by a single-object save or publish on a running server alike. Absent: dynamic mode, and no currency on a summary. |
283283
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
284284
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
285285
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |
@@ -656,7 +656,7 @@ const result = ApiMethod.parse(data);
656656
| **summaryOperations** | `{ object: string; field?: string; function: Enum<'count' \| 'sum' \| 'min' \| 'max' \| 'avg'>; relationshipField?: string; … }` | optional | Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted. |
657657
| **language** | `string` | optional | Programming language for syntax highlighting (e.g., javascript, python, sql) |
658658
| **step** | `number` | optional | Step increment for slider (default: 1) |
659-
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused. Absent: dynamic mode, and no currency on a summary. |
659+
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused, by `defineStack` and by a single-object save or publish on a running server alike. Absent: dynamic mode, and no currency on a summary. |
660660
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
661661
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
662662
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |

‎content/docs/references/system/migration.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Add a new field to an existing object
105105
| **summaryOperations** | `{ object: string; field?: string; function: Enum<'count' \| 'sum' \| 'min' \| 'max' \| 'avg'>; relationshipField?: string; … }` | optional | Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted. |
106106
| **language** | `string` | optional | Programming language for syntax highlighting (e.g., javascript, python, sql) |
107107
| **step** | `number` | optional | Step increment for slider (default: 1) |
108-
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused. Absent: dynamic mode, and no currency on a summary. |
108+
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused, by `defineStack` and by a single-object save or publish on a running server alike. Absent: dynamic mode, and no currency on a summary. |
109109
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
110110
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
111111
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |
@@ -541,7 +541,7 @@ Add a new field to an existing object
541541
| **summaryOperations** | `{ object: string; field?: string; function: Enum<'count' \| 'sum' \| 'min' \| 'max' \| 'avg'>; relationshipField?: string; … }` | optional | Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted. |
542542
| **language** | `string` | optional | Programming language for syntax highlighting (e.g., javascript, python, sql) |
543543
| **step** | `number` | optional | Step increment for slider (default: 1) |
544-
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused. Absent: dynamic mode, and no currency on a summary. |
544+
| **currencyConfig** | `{ currencyMode?: Enum<'dynamic' \| 'fixed' \| 'record'>; defaultCurrency?: string; currencyField?: string; homeAmount?: object }` | optional | Which currency an amount is in: for a currency field, for a formula field whose returnType is currency, and for a summary that rolls up, through a master_detail, child amounts that follow this record's currency (`currencyMode: 'record'` naming this object's own code field). A summary that rolls up a stored home amount (a child field some `homeAmount.field` names) declares `currencyMode: 'dynamic'`, with no `defaultCurrency`, and shows in the organization's home currency. A summary may otherwise declare only `currencyMode: 'fixed'`, when every amount it reads is in that one currency; a `count` summary, any other `dynamic` summary and any other `record` roll-up are refused, by `defineStack` and by a single-object save or publish on a running server alike. Absent: dynamic mode, and no currency on a summary. |
545545
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
546546
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
547547
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |

‎packages/spec/api-surface/data.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@
10631063
"readAutonumberCounter (function)",
10641064
"readBooleanComparand (function)",
10651065
"readNumericString (function)",
1066+
"recordCurrencyDynamicRollupNotHomeError (function)",
10661067
"recordCurrencyFollowedCodeError (function)",
10671068
"recordCurrencyRecordRollupError (function)",
10681069
"recordCurrencyUnfollowedRollupError (function)",
@@ -1099,6 +1100,7 @@
10991100
"resolveSearchFields (function)",
11001101
"seedFile (function)",
11011102
"sequenceWidth (function)",
1103+
"storedHomeAmountSourceOf (function)",
11021104
"stringStoredComparandDoorVerdict (function)",
11031105
"stringStoredComparandFieldVerdict (function)",
11041106
"stripLegacyApiMethods (function)",

‎packages/spec/export-origins/data.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,7 @@
10491049
"readAutonumberCounter": "src/data/autonumber-format.ts#readAutonumberCounter (function)",
10501050
"readBooleanComparand": "src/data/filter-boolean-comparand-declared-type.ts#readBooleanComparand (function)",
10511051
"readNumericString": "src/data/filter-number-comparand-declared-type.ts#readNumericString (function)",
1052+
"recordCurrencyDynamicRollupNotHomeError": "src/data/record-currency-path.ts#recordCurrencyDynamicRollupNotHomeError (function)",
10521053
"recordCurrencyFollowedCodeError": "src/data/record-currency-path.ts#recordCurrencyFollowedCodeError (function)",
10531054
"recordCurrencyRecordRollupError": "src/data/record-currency-path.ts#recordCurrencyRecordRollupError (function)",
10541055
"recordCurrencyUnfollowedRollupError": "src/data/record-currency-path.ts#recordCurrencyUnfollowedRollupError (function)",
@@ -1085,6 +1086,7 @@
10851086
"resolveSearchFields": "src/data/search-fields.ts#resolveSearchFields (function)",
10861087
"seedFile": "src/data/seed-file.zod.ts#seedFile (function)",
10871088
"sequenceWidth": "src/data/autonumber-format.ts#sequenceWidth (function)",
1089+
"storedHomeAmountSourceOf": "src/data/record-currency-path.ts#storedHomeAmountSourceOf (function)",
10881090
"stringStoredComparandDoorVerdict": "src/data/filter-string-stored-comparand-declared-type.ts#stringStoredComparandDoorVerdict (function)",
10891091
"stringStoredComparandFieldVerdict": "src/data/filter-string-stored-comparand-declared-type.ts#stringStoredComparandFieldVerdict (function)",
10901092
"stripLegacyApiMethods": "src/data/object.zod.ts#stripLegacyApiMethods (function)",

0 commit comments

Comments
 (0)