संपादित करें

इसके माध्यम से साझा किया गया


KeyRef.Active() Method

Version: Available or changed with runtime version 1.0.

Indicates whether the key is enabled.

Syntax

Ok :=   KeyRef.Active()

Note

This method can be invoked using property access syntax.

Parameters

KeyRef
 Type: KeyRef
An instance of the KeyRef data type.

Return Value

Ok
 Type: Boolean
true if the key is enabled; otherwise, false.

Example

The following example uses the KeyRef.Active method to determine whether a key in a record is enabled. The table with ID 18 (the Customer table) is open with a reference to table 18. The KeyIndex Method (RecordRef) method retrieves the first key in the record and the varKeyRef.Active method returns a Boolean value that indicates whether the retrieved key is enabled. The Boolean value is displayed in a message box.

var
    RecRef: RecordRef;
    varKeyRef: KeyRef;
    IsActive: Boolean;
begin
    RecRef.Open(18);  
    varKeyRef := RecRef.KeyIndex(1);  
    IsActive := varKeyRef.Active;  
    Message('Is the key active =  %1 ', IsActive);  
end;

KeyRef Data Type
Get Started with AL
Developing Extensions