Redaguoti

Bendrinti naudojant


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 Business Central 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;
}

Record Data Type
Get Started with AL
Developing Extensions