X++ and the D365 runtime for a configure-only practitioner
Teaches X++ from a standing start for someone who has never compiled code: tables, extended data types, enums, classes, the select statement, set-based operators, transaction scope, exception handling, and the extension-specific constructs — ExtensionOf, next, DataEventHandler, PostHandlerFor, delegates. Honest about the size of the step and about who on the team should take it on versus who should stay functional.
What you will be able to do
Read and write basic X++ table operations using select, while select, insert, update_recordset and delete_from
Explain extended data types, base enums and table relations and map them to Plex field-type concepts
Write a Chain-of-Command extension on a table method and explain why calling next is mandatory
Use ttsbegin/ttscommit to scope transactions and explain the retry pattern for deadlock recovery
Distinguish between a CoC extension, a data-event handler and a delegate subscriber and choose the right one for a given requirement
Honestly assess who on the team should learn X++ and who should stay functional
Introduction
This chapter teaches X++ to someone who has never compiled code. That is a frank statement, and it sets the tone for what follows: X++ is not hard in the way that assembly language is hard, but it is genuinely different from anything a Plex administrator, systems analyst or manufacturing IT lead has done before.
Tables, EDTs and enums: the data model in code
In Plex, data is stored in the tenant's database and accessed through configured screens. In D365, data is stored in tables defined in the Application Object Tree (AOT), and every field on a table is backed by an extended data type (EDT) or a base enum.
The select statement: how X++ reads data
X++ uses the select statement to query tables. It looks like SQL but runs inside the AOS (Application Object Server) and compiles to parameterised SQL queries executed against the underlying database.
Set-based operators: the performance discipline
Row-by-row loops are natural for a beginner but expensive for bulk operations. X++ provides three set-based operators that execute as single SQL statements:
Transaction scope: ttsbegin and ttscommit
X++ requires explicit transaction scope for data modifications. The ttsbegin and ttscommit keywords define a transaction boundary:
Why X++ compiles to .NET IL
X++ compiles to .NET Intermediate Language (IL) and runs on the Common Language Runtime (CLR). This means:
Extension constructs: CoC, event handlers and delegates
Chapter 1 introduced the extension model. Here are the constructs in code, with worked examples.
The batch framework: where long-running work belongs
Long-running operations — data imports, mass updates, nightly calculations, report generation — do not belong in a user session. They belong in the batch framework, which runs jobs on dedicated AOS instances, supports parallelism, and provides retry, recurrence and monitoring.
An honest assessment: who should learn X++ and who should not
This section is the most important one in the chapter for a Plex programme manager.
Knowledge check
Summary
X++ is a real programming language with real types, a real compiler, and real consequences for getting data operations wrong. It is not a scripting language, it is not a configuration tool, and it is not something that can be learned over a weekend.