{"title":"SessionSettings.ProfileId([Text]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-profileid-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-profileid-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-profileid-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 profile ID property in a SessionSettings object.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"SessionSettings.ProfileId([Text]) Method","slug":"sessionsettingsprofileidtext-method","at":0,"chars":1761},{"level":2,"title":"Syntax","slug":"syntax","at":169,"chars":151},{"level":2,"title":"Parameters","slug":"parameters","at":320,"chars":320},{"level":2,"title":"Return Value","slug":"return-value","at":640,"chars":126},{"level":2,"title":"Remarks","slug":"remarks","at":766,"chars":236},{"level":2,"title":"Example","slug":"example","at":1002,"chars":616},{"level":2,"title":"Related information","slug":"related-information","at":1618,"chars":143}],"text":"# SessionSettings.ProfileId([Text]) Method\n> Version: _Available or changed with runtime version 1.0._\nGets or sets the profile ID property in a SessionSettings object.\n## Syntax\n```al\n[ProfileId := ]  SessionSettings.ProfileId([NewProfileId: 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] NewProfileId*\nType: ../text/text-data-type\nSpecifies the ID of the profile to set in the SessionSettings object. The value must be a valid profile ID in the system table 2000000072 Profile.\n## Return Value\n*[Optional] ProfileId*\nType: ../text/text-data-type\nThe profile ID that is set in the SessionSettings object.\n## Remarks\nThe profile ID determines the Role Center that is used in the client session. The ProfileId property in a SessionSettings object corresponds to the Profile ID 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 uses the changes the Profile method to set the profile to 'Business Manager'. Finally, the RequestSessionUpdate method sends a request to the client to abandon the current session and start a new session that uses the new profile ID. This example requires a SessionSettings data type variable.\n```al\nvar\n  MySessionSettings : SessionSettings;\nbegin\n  MySessionSettings.Init;\n  MySessionSettings.ProfileId('Business Manager');\n  MySessionSettings.RequestSessionUpdate(false);\nend;\n```\n## Related information\nsessionsettings-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}