SessionSettings.Company([Text]) Method
Version: Available or changed with runtime version 1.0.
Gets or sets the company property in a SessionSettings object.
Syntax
[Company := ] SessionSettings.Company([NewCompanyName: Text])
Note
This method can be invoked using property access syntax.
Parameters
SessionSettings
Type: SessionSettings
An instance of the SessionSettings data type.
[Optional] NewCompanyName
Type: Text
Specifies the name of the company in the SessionSettings object. The company must already exist in the database, otherwise you will get an error at runtime.
Return Value
[Optional] Company
Type: Text
The name of the company that is set in the SessionSettings object.
Remarks
The company property in the SessionSettings object corresponds to the Company 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 calls the Company method to change the company to 'MyCompany'. Finally, the RequestSessionUpdate method sends a request to the client to abandon the current session and start a new session that uses the new company. This example requires a SessionSettings data type variable.
var
MySessionSettings : SessionSettings;
begin
MySessionSettings.Init;
MySessionSettings.Company('MyCompany');
MySessionSettings.RequestSessionUpdate(false);
end;
See Also
SessionSettings Data Type
Get Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈