AL Properties
Properties in AL define how objects behave, how users interact with them, and how the system enforces rules, without writing executable code. Unlike methods, triggers, or events, properties are declarative. They describe behavior that the Business Central runtime enforces automatically.
Understanding properties is critical because well-designed AL solutions rely on properties first and code second. Many problems that beginners solve with triggers or procedures can—and should—be solved using properties.
This module explains all major AL properties, grouped by responsibility, with concise examples.
1. Object-Level Properties (Foundation)
These properties define how an object exists, is exposed, and is governed by the system. They apply at the object level and affect discoverability, compliance, and lifecycle management.
ApplicationAreaControls whether an object or UI control is visible based on enabled application areas for a user.
Example: Using ApplicationArea
page 50100 "Sample Page"
{
ApplicationArea = All;
}
Business Central supports role-based experiences. ApplicationArea ensures users only see features relevant to their role, reducing UI clutter and training overhead. If omitted, controls may be hidden unintentionally.
CaptionDefines the human-readable name shown to users in the UI.
Example: Using Caption
Caption = 'Customer Feedback';
Captions support usability and localization. They allow technical object names to remain stable while user-facing labels can be translated or refined without changing logic.
UsageCategoryControls whether and where a page appears in search and navigation.
Example: Using UsageCategory
UsageCategory = Lists;
Without a UsageCategory, a page can exist but remain invisible to users through search. This property determines how discoverable the page is in the system.
PermissionsAutomatically grants permissions when an object is accessed.
Example: Using Permission
Permissions = tabledata Customer = R;
This prevents runtime permission errors without assigning broad security roles. It allows fine-grained access tied directly to functionality rather than user roles.
DataClassificationSpecifies the sensitivity of data stored in an object or field.
Example: Using DataClassification
DataClassification = CustomerContent;
This is mandatory for GDPR and compliance. It informs system tools and administrators how data should be handled, exported, or protected.
ExtensibleControls whether an enum or object can be extended by other extensions.
Example: Using Extensible
Extensible = true;
This is a design-time decision. Making an enum extensible enables ecosystem growth but also commits you to supporting external extensions.
ObsoleteState, ObsoleteReason, ObsoleteTagUsed to deprecate objects or members safely.
Example: Using ObsoleteState, ObsoleteReason, ObsoleteTag
ObsoleteState = Pending;
ObsoleteReason = 'Use New Customer Page instead';
ObsoleteTag = '23.0';
These properties allow controlled evolution of extensions. Instead of breaking dependent code, developers receive warnings and guidance.
2. Table and Field Properties (Data Behavior)
These properties enforce data correctness and integrity without triggers or validation code.
TableRelationRestricts field values to records from another table.
Example: Using TableRelation
field("Customer No."; Code[20])
{
TableRelation = Customer;
}
This enforces referential integrity at the UI and data level, preventing invalid references before code ever runs.
ValidateTableRelationControls whether the table relation is enforced during validation.
Example: Using ValidateTableRelation
ValidateTableRelation = true;
Disabling this can allow invalid data. It is used only in rare, advanced scenarios such as temporary data staging.
NotBlankPrevents saving records with empty values.
Example: Using NotBlank
NotBlank = true;
This replaces many OnValidate checks and guarantees mandatory data is entered consistently.
AutoIncrementAutomatically generates sequential numeric values.
Example: Using AutoIncrement
AutoIncrement = true;
Used for technical keys such as entry numbers, avoiding manual numbering logic.
InitValueDefines the default value when a record is initialized.
Example: Using InitValue
InitValue = 0;
Ensures predictable defaults and reduces the need for initialization code.
Editable / Enabled (Fields)Controls whether a field can be edited or interacted with.
Example: Using Editable/Enabled
Editable = false;
Enabled = false;
These properties enforce UI rules declaratively, avoiding error-based enforcement in code.
FieldClassDefines whether a field is stored or calculated.
Example: Using FieldClass
FieldClass = FlowField;
FlowFields calculate values dynamically and are never stored physically, ensuring real-time accuracy.
CalcFormulaDefines how FlowFields calculate values.
Example: Using CalcFormula
CalcFormula = Sum("Sales Line"."Line Amount" WHERE("Customer No." = FIELD("No.")));
Powerful aggregation logic can be achieved without writing queries or code.
3. Page Properties (UI Behavior)
These properties control how users interact with records.
PageType
Defines the role of the page.
Example: Using PageType
PageType = List;
Why it matters:
PageType affects navigation, behavior, and expectations. For example, Card vs Document pages behave differently.
SourceTable
Defines which table the page is bound to.
Example: Using SourceTable
SourceTable = Customer;
Why it matters:
Pages never store data themselves; they are always projections of tables.
SourceTableView
Applies default filters and sorting.
Example: Using SourceTableView
SourceTableView = WHERE(Blocked = CONST(false));
Why it matters:
Improves performance and usability by restricting irrelevant records.
Editable, InsertAllowed, ModifyAllowed, DeleteAllowed
Controls user actions globally.
Example: Using Editable,InsertAllowed,ModifyAllowed,DeleteAllowed
Editable = false;
InsertAllowed = false;
ModifyAllowed = false;
DeleteAllowed = false;
Why it matters:
This prevents invalid operations at the UI level instead of reacting with errors.
DelayedInsert
Delays record creation until sufficient data is entered.
Example: Using DelayedInsert
DelayedInsert = true;
Why it matters:
Prevents partially created records, especially on document headers.
RefreshOnActivate
Refreshes data when returning to the page.
Example: Using RefreshOnActivate
RefreshOnActivate = true;
Why it matters:
Ensures users always see current data after navigation.
4. Action and Control Properties (User Interaction)
These properties guide what users can see and do.
Visible
Controls whether a control or action is shown.
Example: Using Visible
Visible = true;
Why it matters:
Allows dynamic UI adaptation without removing controls.
Enabled
Controls whether an action can be executed.
Example: Using Enabled
Enabled = false;
Why it matters:
Disabling actions is often better UX than allowing execution and showing errors.
Importance
Controls visual emphasis.
Example: Using Importance
Importance = Promoted;
Why it matters:
Highlights important fields and actions without cluttering the UI.
Image
Adds an icon to an action.
Example: Using Image
Image = Post;
Why it matters:
Improves recognizability and speeds up user interaction.
ToolTip
Explains functionality inline.
Example: Using ToolTip
ToolTip = 'Posts the document and updates ledger entries.';
Why it matters:
Reduces dependency on training and documentation.
Promoted, PromotedCategory, PromotedIsBig
Controls ribbon placement.
Example: Using Promoted,PromotedCategory,PromotedIsBig
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
Why it matters:
Primary business actions should be immediately visible and accessible.
5. Method and Trigger-Related Properties (Execution Context)
These properties influence execution behavior, without duplicating attributes.
Scope
Limits where logic can execute.
Example: Using Scope
Scope = OnPrem;
Why it matters:
Prevents cloud deployment issues for environment-specific logic.
Access
Controls method accessibility (legacy).
Example: Using Access
Access = Public;
Why it matters:
Still encountered in older code and helps understand historical designs.
EventSubscriberInstance
Controls event subscriber lifecycle.
Example: Using EventSubscriberInstance
EventSubscriberInstance = StaticAutomatic;
Why it matters:
Affects performance and state management in complex event-driven solutions.
TransactionModel
Controls transaction behavior.
Example: Using TransactionModel
TransactionModel = AutoCommit;
Why it matters:
Used in advanced processing where transaction boundaries matter.
6. Report, Query, and Processing Properties
These properties define background execution and data retrieval behavior.
ProcessingOnly
Creates logic-only reports.
Example: Using ProcessingOnly
ProcessingOnly = true;
Why it matters:
Ideal for batch jobs and scheduled tasks.
UseRequestPage
Controls whether user input is requested.
Example: Using UseRequestPage
UseRequestPage = false;
Why it matters:
Supports automation scenarios.
SaveValues
Remembers request page inputs.
Example: Using SaveValues
SaveValues = true;
Why it matters:
Improves user efficiency for recurring reports.
DefaultLayout
Defines report output format.
Example: Using DefaultLayout
DefaultLayout = RDLC;
Why it matters:
Controls rendering and compatibility.
QueryType
Defines query behavior.
Example: Using QueryType
QueryType = Normal;
Why it matters:
Used for analytics, integrations, and performance tuning.
OrderBy
Controls data sorting.
Example: Using OrderBy
OrderBy = ascending("Posting Date");
Why it matters:
Ensures consistent and predictable results.
Elements
Defines query structure.
Example: Using Elements
elements
{
dataitem(Customer; Customer) { }
}
Why it matters:
Queries are optimized readers and should be structured carefully.
Why Properties Matter More Than Code
Properties:
• Are enforced automatically
• Reduce bugs
• Improve performance
• Increase readability
• Make extensions upgrade-safe
Good AL developers exhaust properties first before writing triggers or methods.
Summary
Properties in AL define behavior, structure, security, and interaction without executable code. They are the foundation of clean, maintainable, and professional Business Central extensions.
Mastering properties allows developers to:
• Avoid unnecessary logic
• Build predictable UI
• Enforce data integrity
• Write upgrade-safe solutions
This module completes the behavior-control layer of AL and prepares learners for the next step: when code actually executes.
Hot Topics in Business Central