# System.GetUrl(ClientType [, Text] [, ObjectType] [, Integer] [, Record] [, Boolean] [, Text]) Method
> Version: _Available or changed with runtime version 15.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.
## Syntax
```al
String :=   System.GetUrl(ClientType: ClientType [, Company: Text] [, ObjectType: ObjectType] [, ObjectId: Integer] [, Record: Record] [, UseFilters: Boolean] [, Layout: Text])
```
> NOTE
> This method can be invoked without specifying the data type name.
## Parameters
ClientType
Type: ../clienttype/clienttype-option
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/text-data-type
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/objecttype-option
Specifies the object type that the URL must open. Valid values are: Table, Page, Report, Codeunit, Query, or XmlPort. 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/integer-data-type
Specifies the ID of the specified object type that the URL must open.
*[Optional] Record*
Type: ../record/record-data-type
Specifies the Record variable that specifies which record to open.
*[Optional] UseFilters*
Type: ../boolean/boolean-data-type
Specifies whether to include filters that are defined on the object as a text string in the URL. Note, UseFilters is supported only for ClientType: Desktop, OData, Phone, Tablet, Web, Windows, Default, ODataV4, Teams and Current, when CurrenClientType is one of the ClientType mentioned. An empty string is returned otherwise.
*[Optional] Layout*
Type: ../text/text-data-type
Specifies the page layout to open the page in (Supported List, TallTiles, Tiles, Analysis).
## Return Value
String
Type: ../text/text-data-type
## Related information
system-data-type
Getting started with AL<../../devenv-get-started>
Developing extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-geturl-clienttype-string-objecttype-integer-table-boolean-string-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/system/system-geturl-clienttype-string-objecttype-integer-table-boolean-string-method/
