Tech Tip: How to create DataClass-associated classes
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: April 25, 2022
DataClasses are essentially the ORDA equivalents of tables. For instance, given an Employee table, there exists an Employee DataClass. For each DataClass, there are 3 associated classes:
To create these associated classes, one can create the classes from scratch by following a naming convention and adding “Class extends ____” at the start of their class method. For example, given the Employee DataClass:
Alternatively, the DataClass-associated classes can be generated by clicking the settings (cog) icon in Explorer > Methods, then checking “Show all data classes”.
Initially, the classes will be greyed out, until double-clicked to be created.
Once created, functions can be added to the class to create object methods for the DataClass itself, the DataClass’s entities, and the DataClass’s entity selections, respectively.