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 |
Version: Available or changed with runtime version 1.0.
Adds a link to a record.
[ID := ] Record.AddLink(URL: Text [, Description: Text])
Record
Type: Record
An instance of the Record data type.
URL
Type: Text
[Optional] Description
Type: Text
[Optional] ID
Type: Integer
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.
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;
}