SessionSettings.ProfileId([Text]) Method

Version: Available or changed with runtime version 1.0.

Gets or sets the profile ID property in a SessionSettings object.

Syntax

[ProfileId := ]  SessionSettings.ProfileId([NewProfileId: Text])

Note

This method can be invoked using property access syntax.

Parameters

SessionSettings
 Type: SessionSettings
An instance of the SessionSettings data type.

[Optional] NewProfileId
 Type: Text
Specifies 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.

Return Value

[Optional] ProfileId
 Type: Text
The profile ID that is set in the SessionSettings object.

Remarks

The 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.

Example

This 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.

var
  MySessionSettings : SessionSettings;
begin
  MySessionSettings.Init;
  MySessionSettings.ProfileId('Business Manager');
  MySessionSettings.RequestSessionUpdate(false);
end;  

SessionSettings Data Type
Get Started with AL
Developing Extensions