Skip to content

Commit 7fc986b

Browse files
committed
docs(getting-started): list the ticket's fields on its field group
The blank scaffold's objects place fields with fieldGroups[].fields, the spelling the spec names for new metadata; Field.group is the older one. Claude-Session: https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4266fbe commit 7fc986b

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

‎content/docs/getting-started/build-with-claude-code.mdx‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,12 @@ export const Ticket = ObjectSchema.create({
132132
description: 'A customer support request.',
133133

134134
fields: {
135-
subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200, group: 'ticket' }),
136-
description: Field.textarea({ label: 'Description', group: 'ticket' }),
135+
subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200 }),
136+
description: Field.textarea({ label: 'Description' }),
137137

138138
priority: Field.select({
139139
label: 'Priority',
140140
required: true,
141-
group: 'ticket',
142141
options: [
143142
{ label: 'Low', value: 'low', default: true },
144143
{ label: 'Normal', value: 'normal' },
@@ -150,7 +149,6 @@ export const Ticket = ObjectSchema.create({
150149
status: Field.select({
151150
label: 'Status',
152151
required: true,
153-
group: 'ticket',
154152
options: [
155153
{ label: 'Open', value: 'open', color: '#3B82F6', default: true },
156154
{ label: 'Pending', value: 'pending', color: '#F59E0B' },
@@ -161,9 +159,11 @@ export const Ticket = ObjectSchema.create({
161159
},
162160

163161
// The create and edit forms lay a ticket out by these groups: one section,
164-
// its fields in declaration order. No field is marked `showOnCreate: false`,
165-
// so the create form asks for all four.
166-
fieldGroups: [{ key: 'ticket', label: 'Ticket' }],
162+
// its fields in the order its `fields` list gives. No field is marked
163+
// `showOnCreate: false`, so the create form asks for all four.
164+
fieldGroups: [
165+
{ key: 'ticket', label: 'Ticket', fields: ['subject', 'description', 'priority', 'status'] },
166+
],
167167

168168
sharingModel: 'private', // org-wide default (OWD) — required by the security gate
169169
enable: { apiEnabled: true, searchable: true },
@@ -303,15 +303,16 @@ fails when clicked (the
303303
[two paths](/docs/ui/actions#give-it-server-behavior--two-paths) a handler takes).
304304

305305
The view file declares lists only: no file declares a create or edit **form**.
306-
Both forms lay a ticket out by the object's `fieldGroups`, so each field's
307-
`group: 'ticket'` puts it in the one **Ticket** section, in the order the
308-
fields are declared. No field is marked `showOnCreate: false`, so the create
309-
form asks for all four, the long-text `description` among them. The list
310-
columns leave `description` out, so its group is the only metadata that names
311-
it, and that placement counts as a consumer: a field that no consumer names (a
312-
view column, a field group, a flow, a formula or an action, among the others
313-
the rule counts) gets an advisory `field-no-consumers` warning from
314-
`os validate`, and the run below prints none for `description`.
306+
Both forms lay a ticket out by the object's `fieldGroups`: the one **Ticket**
307+
group's `fields` list places the four fields in that section, in the order it
308+
lists them. No field is marked `showOnCreate: false`, so the create form asks
309+
for all four, the long-text `description` among them. The list columns leave
310+
`description` out, so its entry in the group's `fields` list is the only
311+
metadata that names it, and that placement counts as a consumer: a field that
312+
no consumer names (a view column, a field group, a flow, a formula or an
313+
action, among the others the rule counts) gets an advisory
314+
`field-no-consumers` warning from `os validate`, and the run below prints none
315+
for `description`.
315316

316317
The agent also **exports each new file from its directory's barrel**: one line
317318
at the end of each of the three `index.ts` files, beside the lines the starter

0 commit comments

Comments
 (0)