{"title":"SessionSettings.Company([Text]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-company-method/","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/sessionsettings/sessionsettings-company-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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-company-method","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":"Gets or sets the company property in a SessionSettings object.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"SessionSettings.Company([Text]) Method","slug":"sessionsettingscompanytext-method","at":0,"chars":1670},{"level":2,"title":"Syntax","slug":"syntax","at":164,"chars":149},{"level":2,"title":"Parameters","slug":"parameters","at":313,"chars":332},{"level":2,"title":"Return Value","slug":"return-value","at":645,"chars":133},{"level":2,"title":"Remarks","slug":"remarks","at":778,"chars":155},{"level":2,"title":"Example","slug":"example","at":933,"chars":594},{"level":2,"title":"Related information","slug":"related-information","at":1527,"chars":143}],"text":"# SessionSettings.Company([Text]) Method\n> Version: _Available or changed with runtime version 1.0._\nGets or sets the company property in a SessionSettings object.\n## Syntax\n```al\n[Company := ]  SessionSettings.Company([NewCompanyName: Text])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nSessionSettings\nType: sessionsettings-data-type\nAn instance of the sessionsettings-data-type data type.\n*[Optional] NewCompanyName*\nType: ../text/text-data-type\nSpecifies the name of the company in the SessionSettings object. The company must already exist in the database, otherwise you will get an error at runtime.\n## Return Value\n*[Optional] Company*\nType: ../text/text-data-type\nThe name of the company that is set in the SessionSettings object.\n## Remarks\nThe company property in the SessionSettings object corresponds to the Company field in the in the system table 2000000073 User Personalization.\n## Example\nThis example creates a SessionSettings object that is populated with the current client user's personalization data, and then calls the Company method to change the company to 'MyCompany'. Finally, the RequestSessionUpdate method sends a request to the client to abandon the current session and start a new session that uses the new company. This example requires a SessionSettings data type variable.\n```al\nvar\n  MySessionSettings : SessionSettings;\nbegin\n  MySessionSettings.Init;\n  MySessionSettings.Company('MyCompany');\n  MySessionSettings.RequestSessionUpdate(false);\nend;\n```\n## Related information\nsessionsettings-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}