Modifier

Partager via


SessionSettings.ProfileAppId([Guid]) Method

Version: Available or changed with runtime version 1.0.

Gets or sets the ID of an extension, which provides a profile, in a SessionSettings object.

Syntax

[ProfileAppId := ]  SessionSettings.ProfileAppId([NewProfileAppId: Guid])

Note

This method can be invoked using property access syntax.

Parameters

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

[Optional] NewProfileAppId
 Type: Guid
Sets the GUID of the extension that provides the profile. The value must be a valid GUID for an extension in the system table 2000000072 Profile.

Return Value

[Optional] ProfileAppId
 Type: Guid
The ID of the extension that is set in the SessionSettings object.

Remarks

A profile can be included as part of an extension, instead of being defined as part of the base application. In order to properly identify a profile from an extension in the SessionSettings object, you must specify the extension ID, by using the ProfileAppId method, and the profile ID, by using ProfileId method.

The ProfileAppId property in a SessionSettings object corresponds to the App 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 then uses the ProfileAppId method and ProfileId method to set the object to use the profile that has the ID 'MyExtensionProfile', which is provided in the extension that has the ID 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'. Finally, the RequestSessionUpdate method sends a request to the client to abandon the current client session and start a new session that uses the new profile. This example requires a SessionSettings data type variable.

var
  MySessionSettings : SessionSettings;
begin
  MySessionSettings.Init;
  MySessionSettings.ProfileId('MyExtensionProfile');
  MySessionSettings.ProfileAppId('00001111-aaaa-2222-bbbb-3333cccc4444');
  MySessionSettings.RequestSessionUpdate(false);
end;  

SessionSettings Data Type
Get Started with AL
Developing Extensions