Επεξεργασία

Κοινή χρήση μέσω


InitValue Property

Version: Available or changed with runtime version 1.0.

Sets the initial value of this field when a user creates a new record.

Applies to

  • Table field

Syntax

InitValue = 1;

Remarks

This attribute is only important if you create the record in a window or by using the AL methods Clear Method, or ClearAll Method. For example, this attribute is commonly used in Boolean fields when you want either true or false to be the default.

Note

For a new field added in the table, values are initialized by default according to the data type or they are initialized by the value given in the InitValue property for all new records. If you want to change the InitValue for existing records, you have to specify it in the code and run an upgrade because the value you've set in the InitValue property for the new record doesn't set the values for already existing records.

Clear Method
ClearAll Method