System.GetUrl(ClientType [, Text] [, ObjectType] [, Integer] [, Record] [, Boolean]) Method

Version: Available or changed with runtime version 1.0.

Generates a URL for the specified client target that is based on the configuration of the server instance. If the code runs in a multitenant deployment architecture, the generated URL will automatically apply to the tenant ID of the current user.


String :=   System.GetUrl(ClientType: ClientType [, Company: Text] [, ObjectType: ObjectType] [, ObjectId: Integer] [, Record: Record] [, UseFilters: Boolean])


This method can be invoked without specifying the data type name.


 Type: ClientType
Specifies the client that you want to generate the URL for. If you want to generate a URL that depends on the client that the user is accessing the URL from, choose Current. A runtime error occurs if the ClientType is set to SOAP or OData but the specified object type and ID has not been published as a web service.

[Optional] Company
 Type: Text
Specifies the company that the URL must contain. If you do not specify a company, the URL will run in the user’s current company.

[Optional] ObjectType
 Type: ObjectType
Value: Table, Page, Report, Codeunit, Query, or XmlPort. Specifies the object type that the URL must open. If you specify an object type, you must also specify an object ID in the ObjectId parameter. Otherwise, the user will see a runtime error. If you set the ObjectType parameter to Page, you can also specify a record variable in the Record parameter.

[Optional] ObjectId
 Type: Integer
Specifies the ID of the specified object type that the URL must open.

[Optional] Record
 Type: Record
Specifies the Record variable that specifies which record to open.

[Optional] UseFilters
 Type: Boolean
Specifies whether to include filters that are defined on the object as a text string in the URL.

Return Value

 Type: Text

See Also

System Data Type
Get Started with AL
Developing Extensions