Table of Contents

Codeunit "User Settings"

ID 9176
Namespace: System.Environment.Configuration

Provides basic functionality for user settings.

Methods

GetPageId

Gets the page id for the User Settings page.

procedure GetPageId(): Integer

Returns

Type Description
Integer

The page ID for the User Settings page.

GetUserSettings

Gets the settings for the given user.

procedure GetUserSettings(UserSecurityID: Guid, var UserSettings: Record "User Settings" temporary)

Parameters

Name Type Description
UserSecurityID Guid

The user security id of the user.

UserSettings Table System.Environment.Configuration."User Settings"

The return Record with the settings of the User.

DisableTeachingTips

Disables the teaching tips for a given user.

procedure DisableTeachingTips(UserSecurityId: Guid)

Parameters

Name Type Description
UserSecurityId Guid

EnableTeachingTips

Enables the teaching tips for a given user.

procedure EnableTeachingTips(UserSecurityId: Guid)

Parameters

Name Type Description
UserSecurityId Guid

DisableLegacyActionBar

Disables the legacy action bar for a given user.

procedure DisableLegacyActionBar(UserSecurityId: Guid)

Parameters

Name Type Description
UserSecurityId Guid

EnableLegacyActionBar

Enables the legacy action bar for a given user.

procedure EnableLegacyActionBar(UserSecurityId: Guid)

Parameters

Name Type Description
UserSecurityId Guid

GetAllowedCompaniesForCurrentUser

procedure GetAllowedCompaniesForCurrentUser(TempCompany: __MissingTypeSymbol__)

Parameters

Name Type Description
TempCompany __MissingTypeSymbol__

GetAllowedCompaniesForUser

procedure GetAllowedCompaniesForUser(UserSecurityId: Guid, TempCompany: __MissingTypeSymbol__)

Parameters

Name Type Description
UserSecurityId Guid
TempCompany __MissingTypeSymbol__

LookupProfile

Allows the user to select the new profile for given User Settings

procedure LookupProfile(var UserSettingsRec: Record "User Settings" temporary)

Parameters

Name Type Description
UserSettingsRec Table System.Environment.Configuration."User Settings"

User settings to update with the new profile

GetProfileName

Gets a profile name for the given user settings.

procedure GetProfileName(UserSettingsRec: Record "User Settings" temporary): Text

Parameters

Name Type Description
UserSettingsRec Table System.Environment.Configuration."User Settings"

User settings to get the profile name.

Returns

Type Description
Text

UpdateUserSettings

Updates the user settings for given user

procedure UpdateUserSettings(NewUserSettings: Record "User Settings" temporary)

Parameters

Name Type Description
NewUserSettings Table System.Environment.Configuration."User Settings"

New User settings that should be set to the user.

Events

OnGetDefaultProfile

[IntegrationEvent(False,False)]
procedure OnGetDefaultProfile(AllProfile: __MissingTypeSymbol__)

Parameters

Name Type Description
AllProfile __MissingTypeSymbol__

OnGetSettingsPageID

Integration event that allows changing the settings page ID.

[IntegrationEvent(False,False)]
procedure OnGetSettingsPageID(var SettingsPageID: Integer)

Parameters

Name Type Description
SettingsPageID Integer

The new page ID for the user settings page.

OnBeforeOpenSettings

Integration event that allows changing the behavior of opening the settings page.

[IntegrationEvent(False,False)]
procedure OnBeforeOpenSettings(var Handled: Boolean)

Parameters

Name Type Description
Handled Boolean

Set to true to skip the default behavior.

OnAfterGetUserSettings

Integration event that allows updating the User Settings record with extra values.

[IntegrationEvent(False,False)]
procedure OnAfterGetUserSettings(var UserSettings: Record "User Settings" temporary)

Parameters

Name Type Description
UserSettings Table System.Environment.Configuration."User Settings"

The User settings record to update.

OnUpdateUserSettings

Integration event that allows updating the settings on related records.

[IntegrationEvent(False,False)]
procedure OnUpdateUserSettings(OldSettings: Record "User Settings" temporary, NewSettings: Record "User Settings" temporary)

Parameters

Name Type Description
OldSettings Table System.Environment.Configuration."User Settings"

The value of the settings before any user interaction.

NewSettings Table System.Environment.Configuration."User Settings"

The value of the settings after user interaction.

OnCompanyChange

Integration event that fires every time the company is changed.

[IntegrationEvent(False,False)]
procedure OnCompanyChange(NewCompanyName: Text, var IsSetupInProgress: Boolean)

Parameters

Name Type Description
NewCompanyName Text

The name of the new company.

IsSetupInProgress Boolean

Set to true if the given company is still setting up.

See also