Determines whether a record contains any links.
OK := HASLINKS
Property Value/Return Value
true if the record contains at least one link; otherwise, false.
The link can be a link to a Web site, a file stored on the local computer or on a remote computer, or a link to a Microsoft Dynamics NAV page.
The following example opens table 18 (Customer) as a RecordRef variable that is named CustomerRecref. The FIELD Function (RecordRef) creates a FieldRef variable for field 1 (No.) and stores the value in the MyFieldRef variable. The VALUE Function (FieldRef, TestPage Field) selects record number 20000. The HASLINKS function determines whether the selected record has any links. The function returns No because there are no links in the record. This example requires that you create the following variables and text constant in the C/AL Globals window.
|Text constant||ENU value|
Does this record have one or more links? %1.
CustomerRecref.OPEN(18); MyFieldRef := CustomerRecref.FIELD(1); MyFieldRef.VALUE := '20000'; varHasLinks := CustomerRecref.HASLINKS; MESSAGE(Text000, varHasLinks);