HasLinks Method

Determines whether a record contains any links.

Syntax

Ok :=   RecordRef.HasLinks()

Note

This method can be invoked using property access syntax.

Parameters

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

Return Value

Ok
 Type: Boolean
true if the record contains any links, otherwise false.

Remarks

The link can be a link to a website, a file stored on the local computer or on a remote computer, or a link to a Dynamics 365 page.

Example

The following example opens table 18 (Customer) as a RecordRef variable that is named CustomerRecref. The FIELD Method (RecordRef) creates a FieldRef variable for field 1 (No.) and stores the value in the MyFieldRef variable. The VALUE Method (FieldRef, TestPage Field) selects record number 20000. The HASLINKS method determines whether the selected record has any links. The method returns No because there are no links in the record.

var
    CustomerRecref: RecordRef;
    MyFieldRef: FieldRef;
    varHasLinks: Boolean;
    Text000: TextConst ENU='Does this record have one or more links? %1.';
begin   
    CustomerRecref.OPEN(18);  
    MyFieldRef := CustomerRecref.FIELD(1);  
    MyFieldRef.VALUE := '20000';  
    varHasLinks := CustomerRecref.HASLINKS;  
    MESSAGE(Text000, varHasLinks);  
end;

See Also

RecordRef Data Type
Getting Started with AL
Developing Extensions