Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.64 KB

devenv-initvalue-property.md

File metadata and controls

40 lines (29 loc) · 1.64 KB
title description ms.author ms.date ms.topic author ms.reviewer
InitValue Property
Sets the initial value of this field when a user creates a new record.
solsen
05/14/2024
reference
SusanneWindfeldPedersen
solsen

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.

See Also

Clear Method
ClearAll Method