CHAPTER 1 - Introduction to X++
CHAPTER 2 - X++ Control Statements
CHAPTER 3 - Objects and Classes
CHAPTER 4: Accessing the Database
CHAPTER 5: Exception Handling
CHAPTER 6: Security for Developers
Lesson 9 – Tables as Classes
Tables as Classes
Application tables as classes can be viewed as being similar to application classes in Microsoft Dynamics AX, but with the following differences from classes:
- Tables are persistent.
- Table fields are always public.
- A table in the AOT almost always corresponds to a real object.
- The definition of a table must sometimes be erased if you later want another table to extend it.
A table can be considered an independent class used to address fields or methods defined on that table. In fact when a table is instantiated, it is done so with the system axclasses called xRecord. This class contains methods called when committing record changes to the database and some other system methods that operate on records.