---
id: object/codeunit/9176
type: object
title: Codeunit 9176 "User Settings"
summary: Codeunit 9176 "User Settings" in System Application (System.Environment.Configuration). 11 public procedures, 6 events. Present since at least BC23, still in BC30, changed in BC24-27.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "27"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 5d596c3d389ed942cefda51292d600cbfe45813d2928fcebe0117f6db2d22c5a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/User%20Settings/src/UserSettings.Codeunit.al
    title: src/System Application/App/User Settings/src/UserSettings.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 9176
name: User Settings
namespace: System.Environment.Configuration
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 17
  events: 6
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 4
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 9176 "User Settings"

> Codeunit 9176 "User Settings" in System Application (System.Environment.Configuration). 11 public procedures, 6 events. Present since at least BC23, still in BC30, changed in BC24-27.

System Application · System.Environment.Configuration · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/User%20Settings/src/UserSettings.Codeunit.al) · facts from BC29

## Events published

- `OnGetDefaultProfile(var AllProfile: Record "All Profile")` (integration): Integration event to get the default profile.
  - subscribers: [Codeunit 9170 "Conf./Personalization Mgt."](../codeunit/9170.md) OnGetDefaultProfile
- `OnGetSettingsPageID(var SettingsPageID: Integer)` (integration): Integration event that allows changing the settings page ID.
- `OnBeforeOpenSettings(var Handled: Boolean)` (integration): Integration event that allows changing the behavior of opening the settings page.
- `OnAfterGetUserSettings(var UserSettings: Record "User Settings")` (integration): Integration event that allows updating the User Settings record with extra values.
- `OnUpdateUserSettings(OldSettings: Record "User Settings"; NewSettings: Record "User Settings")` (integration): Integration event that allows updating the settings on related records.
  - subscribers: [Codeunit 1438 "Ess. Bus. Headline Subscribers"](../codeunit/1438.md) OnBeforeUpdateUserSettings, [Codeunit 9275 "My Settings"](../codeunit/9275.md) OnUpdateUserSettings
- `OnCompanyChange(NewCompanyName: Text; var IsSetupInProgress: Boolean)` (integration): Integration event that fires every time the company is changed.
  - subscribers: [Codeunit 1800 "Assisted Company Setup"](../codeunit/1800.md) OnCompanyChangeCheckForSetupCompletion

## Procedures

- `GetPageId(): Integer`
- `GetUserSettings(UserSecurityID: Guid; var UserSettings: Record "User Settings")`: Gets the settings for the given user.
- `DisableTeachingTips(UserSecurityId: Guid)`: Disables the teaching tips for a given user.
- `EnableTeachingTips(UserSecurityId: Guid)`: Enables the teaching tips for a given user.
- `DisableLegacyActionBar(UserSecurityId: Guid)`: Disables the legacy action bar for a given user.
- `EnableLegacyActionBar(UserSecurityId: Guid)`: Enables the legacy action bar for a given user.
- `GetAllowedCompaniesForCurrentUser(var TempCompany: Record Company temporary)`: Get the companies the current user has access to.
- `GetAllowedCompaniesForUser(UserSecurityId: Guid; var TempCompany: Record Company temporary)`: Get the companies the specified user has access to.
- `LookupProfile(var UserSettingsRec: Record "User Settings")`: Allows the user to select the new profile for given User Settings
- `GetProfileName(UserSettingsRec: Record "User Settings"): Text`: Gets a profile name for the given user settings.
- `UpdateUserSettings(NewUserSettings: Record "User Settings")`

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 9175 "User Settings Impl."](../codeunit/9175.md) (11 calls: `DisableLegacyActionBar → DisableLegacyActionBar`, `DisableTeachingTips → DisableTeachingTips`, `EnableLegacyActionBar → EnableLegacyActionBar`, …)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-27

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "User Settings")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
