txc provides a comprehensive set of commands for managing Dataverse schema — entities (tables), attributes (columns), relationships, and option sets — directly from the command line. All schema commands live under txc environment entity (alias: txc env entity).
Every mutating schema command extends StagedCliCommand, so it accepts either --apply (execute immediately) or --stage (queue for batch apply). See changeset-staging.md for details on the staging workflow.
Creates a new Dataverse entity (table). Uses the CreateEntities batch API internally when staged — see dataverse-metadata-performance.md.
| Option | Required | Default | Description |
|---|---|---|---|
--name |
Yes | — | Logical name (including publisher prefix) |
--display-name |
Yes | — | Display name shown in the UI |
--plural-name |
Yes | — | Plural display name |
--description |
No | — | Entity description |
--solution |
No | — | Solution unique name to add the entity to |
--ownership |
No | user |
user or organization |
--type |
No | standard |
Entity type (standard, etc.) |
--has-notes |
No | false |
Enable notes (annotations) |
--has-activities |
No | false |
Enable activity associations |
--enable-audit |
No | false |
Enable auditing |
--enable-change-tracking |
No | false |
Enable change tracking |
txc env entity create --name tom_project \
--display-name "Project" --plural-name "Projects" \
--ownership user --has-notes --enable-audit --applyRetrieves detailed metadata for a single entity.
| Argument/Option | Required | Description |
|---|---|---|
entity (positional) |
Yes | Entity logical name |
txc env entity get accountUpdates an existing entity's display metadata. At least one of the optional flags must be provided.
| Option | Required | Description |
|---|---|---|
--entity |
Yes | Entity logical name |
--display-name |
No | New display name |
--plural-name |
No | New plural display name |
--description |
No | New description |
txc env entity update --entity tom_project --display-name "Initiative" --applyDeletes an entity from the environment. Destructive — requires --yes to skip confirmation.
| Option | Required | Description |
|---|---|---|
--entity |
Yes | Entity logical name |
--yes |
No | Skip confirmation prompt |
txc env entity delete --entity tom_project --yes --applyLists entities in the environment.
| Option | Required | Default | Description |
|---|---|---|---|
--search |
No | — | Filter entities by name substring |
--include-system |
No | false |
Include system entities |
txc env entity list --search projectShows a detailed description of an entity's schema — attributes, relationships, and metadata.
| Argument/Option | Required | Default | Description |
|---|---|---|---|
entity (positional) |
Yes | — | Entity logical name |
--include-system |
No | false |
Include system-managed attributes |
txc env entity describe account --include-systemCreates a new attribute (column) on an entity. The --type flag determines which type-specific parameters are available.
Common options (all types):
| Argument/Option | Required | Default | Description |
|---|---|---|---|
<entity> (positional) |
Yes | — | Target entity logical name |
--name |
Yes | — | Attribute logical name |
--type |
Yes | — | Attribute type (see types) |
--display-name |
No | — | Display name |
--description |
No | — | Description |
--required |
No | none |
Requirement level: none, recommended, required |
--solution |
No | — | Solution unique name |
--is-auditable |
No | false |
Enable auditing |
--is-searchable |
No | true |
Include in quick-find/relevance search |
--is-secured |
No | false |
Enable field-level security |
| Type value | Description |
|---|---|
string |
Single-line text |
memo |
Multi-line text |
number |
Whole number (integer) |
decimal |
Decimal number |
float |
Floating-point number |
money |
Currency |
bool |
Yes/No (two-option) |
datetime |
Date and time |
choice |
Single-select option set |
multichoice |
Multi-select option set |
lookup |
Single-entity lookup |
polymorphic-lookup |
Multi-table lookup |
customer |
Customer lookup (account + contact) |
image |
Image column |
file |
File column |
bigint |
Big integer |
String / Memo:
| Option | Default | Description |
|---|---|---|
--max-length |
— | Maximum character length |
--string-format |
— | Format hint (e.g. email, url, phone) |
Number (whole number):
| Option | Default | Description |
|---|---|---|
--min-value |
— | Minimum value |
--max-value |
— | Maximum value |
--number-format |
— | Display format |
Decimal / Float / Money:
| Option | Default | Description |
|---|---|---|
--min-value |
— | Minimum value |
--max-value |
— | Maximum value |
--precision |
— | Number of decimal places |
--precision-source |
— | Precision source (money only) |
Bool:
| Option | Default | Description |
|---|---|---|
--true-label |
Yes |
Label for the true value |
--false-label |
No |
Label for the false value |
DateTime:
| Option | Default | Description |
|---|---|---|
--datetime-format |
— | dateonly or dateandtime |
--datetime-behavior |
— | uselocal, utc, or timezoneneutral |
Choice / Multichoice:
| Option | Default | Description |
|---|---|---|
--options |
— | Comma-separated list of option labels (creates a local option set) |
--global-optionset |
— | Name of an existing global option set to bind |
Lookup:
| Option | Default | Description |
|---|---|---|
--target-entity |
— | Target entity logical name |
--cascade-delete |
removelink |
Cascade delete behaviour |
Polymorphic Lookup:
| Option | Default | Description |
|---|---|---|
--target-entities |
— | Comma-separated target entity logical names |
Customer: No additional options — automatically targets account and contact.
Image:
| Option | Default | Description |
|---|---|---|
--max-size-kb |
— | Maximum image size in KB |
--can-store-full-image |
true |
Store full-resolution image |
File:
| Option | Default | Description |
|---|---|---|
--max-size-kb |
— | Maximum file size in KB |
BigInt: No additional type-specific options.
# String attribute
txc env entity attribute create tom_project \
--name tom_code --type string --display-name "Code" \
--max-length 20 --required required --apply
# Money attribute
txc env entity attribute create tom_project \
--name tom_budget --type money --display-name "Budget" \
--precision 2 --apply
# Lookup attribute
txc env entity attribute create tom_project \
--name tom_accountid --type lookup --display-name "Account" \
--target-entity account --apply
# Choice attribute
txc env entity attribute create tom_project \
--name tom_priority --type choice --display-name "Priority" \
--options "Low,Medium,High,Critical" --applyRetrieves detailed metadata for a single attribute.
| Argument/Option | Required | Description |
|---|---|---|
<entity> (positional) |
Yes | Entity logical name |
--name |
Yes | Attribute logical name |
txc env entity attribute get account --name nameUpdates an existing attribute's display metadata.
| Argument/Option | Required | Description |
|---|---|---|
<entity> (positional) |
Yes | Entity logical name |
--name |
Yes | Attribute logical name |
--display-name |
No | New display name |
--description |
No | New description |
--required |
No | New requirement level |
Note: Updating
RequiredLeveluses a Web APIPUT(full replacement) internally, because the SDK'sUpdateAttributeRequestsilently ignoresRequiredLevelchanges. See dataverse-metadata-performance.md for details.
txc env entity attribute update account --name name \
--required required --applyDeletes an attribute. Destructive — requires --yes.
| Argument/Option | Required | Description |
|---|---|---|
<entity> (positional) |
Yes | Entity logical name |
--name |
Yes | Attribute logical name |
--yes |
No | Skip confirmation prompt |
txc env entity attribute delete tom_project --name tom_code --yes --applyThese commands help MCP clients and interactive users discover available attribute types and their parameters.
Lists all supported attribute types.
txc env entity attribute type listOutputs a JSON schema describing the parameters for a specific attribute type. Useful for MCP tool integration where clients need to know which options apply to a given type.
| Argument | Required | Description |
|---|---|---|
type (positional) |
Yes | Attribute type name (e.g. string, lookup) |
txc env entity attribute type describe lookupManage many-to-many (N:N) relationships between entities.
Creates a new N:N relationship.
| Option | Required | Description |
|---|---|---|
--entity1 |
Yes | First entity logical name |
--entity2 |
Yes | Second entity logical name |
--name |
Yes | Relationship schema name |
--display-name |
No | Display name |
txc env entity relationship create \
--entity1 tom_project --entity2 account \
--name tom_project_account --display-name "Project Accounts" --applyLists relationships for an entity.
| Option | Required | Description |
|---|---|---|
--entity |
Yes | Entity logical name |
txc env entity relationship list --entity accountDeletes a relationship. Destructive — requires --yes.
| Option | Required | Description |
|---|---|---|
--name |
Yes | Relationship schema name |
--yes |
No | Skip confirmation prompt |
txc env entity relationship delete --name tom_project_account --yes --applyManage global option sets and individual options on both local and global option sets.
Creates a new global option set.
| Option | Required | Description |
|---|---|---|
--name |
Yes | Schema name |
--display-name |
Yes | Display name |
--options |
Yes | Comma-separated list of option labels |
--description |
No | Description |
--solution |
No | Solution unique name |
txc env entity optionset global create \
--name tom_priority --display-name "Priority" \
--options "Low,Medium,High,Critical" --applyDeletes a global option set. Destructive — requires --yes.
| Option | Required | Description |
|---|---|---|
--name |
Yes | Global option set name |
--yes |
No | Skip confirmation prompt |
Lists all global option sets in the environment.
txc env entity optionset global listAdds an option to a local or global option set. Target the option set by providing either --entity + --attribute (local) or --global-optionset (global).
| Option | Required | Description |
|---|---|---|
--entity |
No* | Entity logical name (for local option set) |
--attribute |
No* | Attribute logical name (for local option set) |
--global-optionset |
No* | Global option set name |
--label |
Yes | Label for the new option |
--value |
No | Explicit integer value (auto-assigned if omitted) |
* Provide either --entity + --attribute or --global-optionset.
txc env entity optionset option add \
--global-optionset tom_priority --label "Urgent" --applyRemoves an option from a local or global option set. Destructive — requires --yes.
| Option | Required | Description |
|---|---|---|
--entity |
No* | Entity logical name (for local option set) |
--attribute |
No* | Attribute logical name (for local option set) |
--global-optionset |
No* | Global option set name |
--value |
Yes | Integer value of the option to remove |
--yes |
No | Skip confirmation prompt |