Checks whether a field is enabled.
|
Ok := Record.FIELDACTIVE(Field)
|
Parameters
- Field
-
Type: Field
The field that you want to check.
Property Value/Return Value
Type: Boolean
true if the field is enabled; otherwise,
false.
Remarks
Example
This example requires that you create the following
variable and text constants in the C/AL Globals window.
Variable name |
DataType |
Subtype |
CustomerRec
|
Record
|
Customer
|
Text constant name |
ENU value |
Text000
|
Atlanta
|
Text001
|
The field is not marked as enabled.
|
|
Copy Code |
CustomerRec."Address 2" := Text000;
// If the Address 2 field has not been marked as enbaled, this
// statement causes a run-time error.
// You can avoid this error by performing the following test.
IF CustomerRec.FIELDACTIVE("Address 2") THEN
CustomerRec."Address 2" := Text000
ELSE
MESSAGE(Text001);
|
See Also