Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.99 KB

File metadata and controls

73 lines (53 loc) · 1.99 KB
title description ms.author ms.date ms.topic author ms.reviewer
Record.AddLink(Text [, Text]) Method
Adds a link to a record.
solsen
08/26/2024
reference
SusanneWindfeldPedersen
solsen

Record.AddLink(Text [, Text]) Method

Version: Available or changed with runtime version 1.0.

Adds a link to a record.

Syntax

[ID := ]  Record.AddLink(URL: Text [, Description: Text])

Parameters

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

URL
 Type: Text

[Optional] Description
 Type: Text

Return Value

[Optional] ID
 Type: Integer

Remarks

When you add a link to a page or a table, an entry is created in the Record Link system table. Each entry is given an ID.

The URL can be a link to a website, a file stored on the local computer or on a remote computer, or a link to a [!INCLUDE prod_short] page.

Example

In this example, you get the customer record that has a primary key number of 15000 and then add the specified URL to the Record Link table for that customer. You can then view the link in the Links FactBox on the Customer list or Customer card pages.

codeunit 50111 CustomerLink
{
    trigger OnRun()
    var
        Customer: Record Customer;
        Id: Integer;

    begin
        Customer.Get('15000');
        Id := Customer.AddLink('www.northwindtraders.com', 'Northwind Traders');
    end;
}

Related information

Record Data Type
Get Started with AL
Developing Extensions