The INIT function initializes a record in preparation for its use, typically in the course of building a record entry to insert in a table. The syntax is as follows:
Record.INIT;
All the data fields in the record are initialized as follows:
- Fields that have an InitValue property defined are initialized to the specified value.
- Fields that do not have a defined InitValue are initialized to the default value for their data type.
- Primary key fields and timestamps are not automatically initialized. If they contain values, those will remain. If new values are desired, they must be assigned in code.