AL Properties

Overview of Microsoft Dynamics 365 Business Central

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.

ApplicationArea

Controls whether an object or UI control is visible based on enabled application areas for a user.

Example: Using ApplicationArea

AL

page 50100 "Sample Page"
{
    ApplicationArea = All;
}
    
Why it matters:

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.

Caption

Defines the human-readable name shown to users in the UI.

Example: Using Caption

AL

Caption = 'Customer Feedback';
    
Why it matters:

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.

UsageCategory

Controls whether and where a page appears in search and navigation.

Example: Using UsageCategory

AL

UsageCategory = Lists;
    
Why it matters:

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.

Permissions

Automatically grants permissions when an object is accessed.

Example: Using Permission

AL

Permissions = tabledata Customer = R;
    
Why it matters:

This prevents runtime permission errors without assigning broad security roles. It allows fine-grained access tied directly to functionality rather than user roles.

DataClassification

Specifies the sensitivity of data stored in an object or field.

Example: Using DataClassification

AL

DataClassification = CustomerContent;
    
Why it matters:

This is mandatory for GDPR and compliance. It informs system tools and administrators how data should be handled, exported, or protected.

Extensible

Controls whether an enum or object can be extended by other extensions.

Example: Using Extensible

AL

Extensible = true;
    
Why it matters:

This is a design-time decision. Making an enum extensible enables ecosystem growth but also commits you to supporting external extensions.

ObsoleteState, ObsoleteReason, ObsoleteTag

Used to deprecate objects or members safely.

Example: Using ObsoleteState, ObsoleteReason, ObsoleteTag

AL

ObsoleteState = Pending;
ObsoleteReason = 'Use New Customer Page instead';
ObsoleteTag = '23.0';
    
Why it matters:

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.

TableRelation

Restricts field values to records from another table.

Example: Using TableRelation

AL

field("Customer No."; Code[20])
{
    TableRelation = Customer;
}
    
Why it matters:

This enforces referential integrity at the UI and data level, preventing invalid references before code ever runs.

ValidateTableRelation

Controls whether the table relation is enforced during validation.

Example: Using ValidateTableRelation

AL

ValidateTableRelation = true;
    
Why it matters:

Disabling this can allow invalid data. It is used only in rare, advanced scenarios such as temporary data staging.

NotBlank

Prevents saving records with empty values.

Example: Using NotBlank

AL

NotBlank = true;
    
Why it matters:

This replaces many OnValidate checks and guarantees mandatory data is entered consistently.

AutoIncrement

Automatically generates sequential numeric values.

Example: Using AutoIncrement

AL

AutoIncrement = true;
    
Why it matters:

Used for technical keys such as entry numbers, avoiding manual numbering logic.

InitValue

Defines the default value when a record is initialized.

Example: Using InitValue

AL

InitValue = 0;
    
Why it matters:

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

AL

Editable = false;
Enabled = false;
    
Why it matters:

These properties enforce UI rules declaratively, avoiding error-based enforcement in code.

FieldClass

Defines whether a field is stored or calculated.

Example: Using FieldClass

AL

FieldClass = FlowField;
    
Why it matters:

FlowFields calculate values dynamically and are never stored physically, ensuring real-time accuracy.

CalcFormula

Defines how FlowFields calculate values.

Example: Using CalcFormula

AL

CalcFormula = Sum("Sales Line"."Line Amount" WHERE("Customer No." = FIELD("No.")));
    
Why it matters:

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

AL

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

AL

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

AL

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

AL

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

AL

DelayedInsert = true;
    

Why it matters:

Prevents partially created records, especially on document headers.

RefreshOnActivate

Refreshes data when returning to the page.

Example: Using RefreshOnActivate

AL

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

AL

Visible = true;
    

Why it matters:

Allows dynamic UI adaptation without removing controls.

Enabled

Controls whether an action can be executed.

Example: Using Enabled

AL

Enabled = false;
    

Why it matters:

Disabling actions is often better UX than allowing execution and showing errors.

Importance

Controls visual emphasis.

Example: Using Importance

AL

Importance = Promoted;
    

Why it matters:

Highlights important fields and actions without cluttering the UI.

Image

Adds an icon to an action.

Example: Using Image

AL

Image = Post;
    

Why it matters:

Improves recognizability and speeds up user interaction.

ToolTip

Explains functionality inline.

Example: Using ToolTip

AL

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

AL

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

AL

Scope = OnPrem;
    

Why it matters:

Prevents cloud deployment issues for environment-specific logic.

Access

Controls method accessibility (legacy).

Example: Using Access

AL

Access = Public;
    

Why it matters:

Still encountered in older code and helps understand historical designs.

EventSubscriberInstance

Controls event subscriber lifecycle.

Example: Using EventSubscriberInstance

AL

EventSubscriberInstance = StaticAutomatic;
    

Why it matters:

Affects performance and state management in complex event-driven solutions.

TransactionModel

Controls transaction behavior.

Example: Using TransactionModel

AL

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

AL

ProcessingOnly = true;
    

Why it matters:

Ideal for batch jobs and scheduled tasks.

UseRequestPage

Controls whether user input is requested.

Example: Using UseRequestPage

AL

UseRequestPage = false;
    

Why it matters:

Supports automation scenarios.

SaveValues

Remembers request page inputs.

Example: Using SaveValues

AL

SaveValues = true;
    

Why it matters:

Improves user efficiency for recurring reports.

DefaultLayout

Defines report output format.

Example: Using DefaultLayout

AL

DefaultLayout = RDLC;
    

Why it matters:

Controls rendering and compatibility.

QueryType

Defines query behavior.

Example: Using QueryType

AL

QueryType = Normal;
    

Why it matters:

Used for analytics, integrations, and performance tuning.

OrderBy

Controls data sorting.

Example: Using OrderBy

AL

OrderBy = ascending("Posting Date");
    

Why it matters:

Ensures consistent and predictable results.

Elements

Defines query structure.

Example: Using Elements

AL

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

Next Steps in Business Central