Skip to main content

Table Extensions

A Table Extension (AxTableExtension) modifies an existing table without altering its original source code. Extensions are the standard mechanism for customising tables delivered by Microsoft or other ISVs — they follow the overlay-free development model that ensures upgradeability.

Table extensions are created by right-clicking a table in the AOT and selecting Create extension. This creates an AxTableExtension object named <OriginalTableName>.<YourModelName> in your model.

What Can Be Extended

CapabilityDescription
Add FieldsNew fields of any base type (String, Integer, Real, Enum, etc.) with full EDT support.
Add Field GroupsNew field groups and extend existing groups via FieldGroupExtensions.
Add IndexesNew indexes including full-text indexes.
Add RelationsNew relations and extend existing relations via RelationExtensions.
Add MappingsNew table mappings.
Modify PropertiesChange property values on existing elements via PropertyModifications.
Modify FieldsChange properties on existing fields via FieldModifications.
Modify RelationsChange properties on existing relations via RelationModifications.

Extension Naming Conventions

PatternExampleDescription
Extension objectCustTable.SAMOModelBase table name + dot + your model name.
New fieldsSAMOCustTierPrefix with your solution abbreviation to avoid collisions.
New indexesSAMOCustTierIdxPrefix + descriptive name + Idx suffix.
New relationsSAMOCustTier_FKPrefix + descriptive name + _FK suffix.
New field groupsSAMOCustomFieldsPrefix + descriptive group name.
warning

Always prefix new elements with your solution abbreviation (e.g., SAMO). Multiple ISVs may extend the same table — prefixed names prevent naming collisions.

Best Practices

  • One extension per model per table. Do not create multiple extensions of the same table in a single model.
  • Always use EDTs on new fields. Never add raw base-type fields without an EDT.
  • Add new fields to field groups. Every new field should belong to at least one field group so it surfaces on forms automatically.
  • Extend existing field groups using FieldGroupExtensions rather than creating entirely new groups when the field logically belongs with existing fields.
  • Test database synchronisation after adding fields or indexes — verify the SQL schema changes apply cleanly.
  • Use PropertyModifications sparingly. Changing properties on base elements can break other extensions or updates. Only modify when necessary and document the reason.
  • Never modify the clustered index of a base table — this can cause severe performance degradation and data reorganisation.

Extending Field Groups

The FieldGroupExtensions collection allows you to add fields to an existing field group defined on the base table. This is preferred over creating new field groups when the new field logically belongs alongside existing fields.

For example, to add a custom field to the AutoLookup group on CustTable:

  1. In the table extension, expand FieldGroupExtensions.
  2. Add a reference to the AutoLookup group.
  3. Add your field (SAMOCustTier) to the group extension.

The field will then appear in all lookups for CustTable without modifying the base table.

Extending Relations

The RelationExtensions collection lets you add new constraints to an existing relation. This is useful when an extension field needs to participate in an existing join condition.

The RelationModifications collection lets you modify properties on existing relation definitions — for example, changing the DeleteAction behaviour.


Properties

9/9 properties
PropertyDisplay NameTypeDescription
Table ExtensionAxTableExtension
NameNameStringThe name of the extension element (follows BaseTable.Package naming).
IsObsoleteIs ObsoleteNoYesWhether the extension is deprecated. Values: No (0), Yes (1).
VisibilityVisibilityCompilerVisibilityAccess level visibility. Values: Private (0), Protected (1), Public (2), Internal (3), InternalProtected (4).
TagsTagsStringTags for this element separated by semicolon.
FormRefForm RefStringMenu item identifying the default form for this table (can be overridden in extension).
Field Group ExtensionAxTableFieldGroupExtension
NameNameStringThe name of the existing field group to extend.
TagsTagsStringTags for this element separated by semicolon.
Relation ExtensionAxTableRelationExtension
NameNameStringThe name of the existing relation to extend.
TagsTagsStringTags for this element separated by semicolon.