Skip to main content

View Extensions

A View Extension (AxViewExtension) modifies an existing AOT view without altering its original source code. View extensions follow the same overlay-free model as table and form extensions, enabling customisation while preserving upgradeability.

View extensions are created by right-clicking a view in the AOT and selecting Create extension. This creates an AxViewExtension object named <OriginalViewName>.<YourModelName> in your model.

What Can Be Extended

CapabilityDescription
Add FieldsNew computed or mapped view fields.
Add Field GroupsNew field groups and extend existing groups via FieldGroupExtensions.
Add Data SourcesNew embedded data sources joined to existing ones.
Add RangesNew filter ranges on existing data sources.
Add MappingsNew table mappings.
Modify PropertiesChange property values on existing elements via PropertyModifications.
Modify FieldsChange properties on existing fields via FieldModifications.
note

View extensions cannot remove existing fields, data sources, or ranges. They are purely additive with property modification capability.

Extension Naming Conventions

PatternExampleDescription
Extension objectCustTransView.SAMOModelBase view name + dot + your model name.
New fieldsSAMOTierLevelPrefix with your solution abbreviation.
New data sourcesSAMOCustTierTablePrefix + descriptive table name.

Best Practices

  • One extension per model per view. Do not create multiple extensions of the same view in a single model.
  • Test the generated SQL. After adding fields or data sources, verify the resulting SQL view definition via database synchronisation.
  • Be cautious with new data sources. Adding a joined data source changes the view's query plan and can affect performance on large datasets.
  • Use computed fields sparingly. Complex expressions in view fields execute for every row and cannot be indexed.
  • Add new fields to field groups to ensure they surface automatically on forms that consume the view.

Properties

4/4 properties
PropertyDisplay NameTypeDescription
View ExtensionAxViewExtension
NameNameStringThe name of the extension element (follows BaseView.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.