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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈