The statement-by-statement translation from PL/SQL to X++ — SELECT INTO and cursors to select firstonly and while select, BULK COLLECT/FORALL to set-based DML, COMMIT/ROLLBACK/SAVEPOINT to ttsbegin/ttscommit with no partial rollback, the company column to DataAreaId and RecId, and the Logical Unit's New__/Modify__/Check_Insert___ method model to table methods and Chain of Command.
Chapter 1 was about a rule and the architecture it produces: you cannot modify the base, so you learn to read it and wrap it. This chapter is about the day job underneath that rule — the statements you actually type.
Three surface differences, and nothing else. firstonly plays the role of a single-row fetch. Equality is == and conjunction is &&, because X++ borrows C-family operators. Fields are read through a table buffer — a variable declared with the table's type — using dot notation, rather than into separate local variables named after each…
Read as a rename of COMMIT, this looks harmless. It is not, and this is the most consequential semantic difference in the whole language.
Most transactional tables in D365 are company-scoped, and the AOS adds WHERE DataAreaId = <current company> to every query against them. Conceptually this is IFS's company column.
An IFS LU's public write surface lives in the _API package: New__ to insert, Modify__ to update, Remove__ to delete, with Check_Insert___, Prepare_Insert___ and Unpack_Check_Insert___ as the validation and defaulting hooks that fire underneath them.
This is the part of the chapter that is easiest to under-estimate, because the syntax makes it look optional. It is not.
X++ has no associative array, no VARRAY, and no Global Temporary Table in the Oracle sense. Five structures share that work instead:
An IFS database view, and the _RPI/projection layer built on top of it, plays two roles at once: a joined read model for reporting, and the shape exposed to Aurena and IFS Connect for integration. In D365 that responsibility splits:
In IFS, this is a Check_Insert___ override in the LU's _API package, calling super() first:
X++ is a SQL-embedded, table-centric ERP language, exactly like PL/SQL in spirit — the set-based instinct, the strong typing, and the habit of thinking in statements rather than row-by-row loops all transfer intact. What changes is everything that follows from logic no longer living inside the database.