{"title":"ClientType option type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/clienttype/clienttype-option/","by":"JOP-AL","license":"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/clienttype/clienttype-option, 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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/clienttype/clienttype-option","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Represents the type of the client executing the operation.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"ClientType option type","slug":"clienttype-option-type","at":0,"chars":1380},{"level":2,"title":"Members","slug":"members","at":144,"chars":598},{"level":2,"title":"Remarks","slug":"remarks","at":742,"chars":486},{"level":2,"title":"Related information","slug":"related-information","at":1228,"chars":152}],"text":"# ClientType option type\n> Version: _Available or changed with runtime version 1.0._\nRepresents the type of the client executing the operation.\n## Members\nMember|Description\nBackground|A background session.\nChildSession|A child session.\nDesktop|A desktop client.\nManagement|A management client.\nNAS|A NAS client.\nOData|A NAS client.\nPhone|Microsoft Dynamics Business Central Phone client.\nSOAP|A SOAP client.\nTablet|Microsoft Dynamics Business Central Tablet client.\nWeb|Microsoft Dynamics Business Central Web client.\nWindows|Microsoft Dynamics Business Central Windows client.\nCurrent|Microsoft Dynamics Business Central Windows client.\nDefault|The default client.\nODataV4|A ODataV4 client.\nApi|An API client.\nTeams|Microsoft Teams client.\n## Remarks\nSome of these client types don't allow AL code that interacts with the user, such as using the methods Dialog.Open, Dialog.Update, Window.Open, Window.Update, or System.Error.\nIf the same codeunit needs to run both in the UI and also in the background (in a scheduled task or with a job queue entry), or in a web service call (SOAP/OData/API), then use `if GuiAllowed() then` calls to encapsulate AL code that interacts with the user. See ../system/system-guiallowed-method.\n## Related information\n../system/system-guiallowed-method\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}