Custom objects are new record types your app adds to a workspace — Post Card, Invoice, Subscription, anything specific to your domain. Each object declares its schema (fields, relations, default values) and a stable universal identifier that survives across syncs and deploys.Documentation Index
Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
Use this file to discover all available pages before exploring further.
src/objects/post-card.object.ts
Hauptpunkte
- Der
universalIdentifiermuss eindeutig und über Deployments hinweg stabil sein. - Jedes Feld benötigt
name,type,labelund einen eigenen stabilenuniversalIdentifier. - Das Array
fieldsist optional — Sie können Objekte ohne benutzerdefinierte Felder definieren. - Inline fields defined here do not need an
objectUniversalIdentifier— it’s inherited from the parent object. UsedefineField()to add fields to objects you don’t own. - You can scaffold new objects with
yarn twenty add object, which guides you through naming, fields, and relationships. See Architecture → Scaffolding entities.
Base fields are added automatically. When you define a custom object, Twenty creates standard fields like
id, name, createdAt, updatedAt, createdBy, updatedBy, and deletedAt for you. You don’t need to declare them in your fields array — only your custom fields. You can override a default field by declaring one with the same name, but this is rarely a good idea.Was kommt als Nächstes
- Connect this object to others — see Relations for the bidirectional relation pattern.
- Add fields to objects from other apps — see Extending Objects for
defineField(). - Display this object in the UI — see Views and Navigation Menu Items to put it in the sidebar.