What Data Does SessionParametersSetting Parameter Contain?

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jul 20, 2011
Company:

Please help to understand the SessionParametersSetting(SessionParametersSetting) procedure which is placed in the Session Module. How is the SessionParametersSetting parameter filled? I have 5 Session Parameters (CurrentUser, CurrentUserOrganizations, CurrentUserDepartments and so on), but in the SessionParametersSetting array there is only CurrentUser parameter… Why only it and no others?

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

This parameter was added to implement a Lazy Load of Session Parameters; it works in the following way: the SessionParametersSetting procedure is called every time the access to the uninitialized Session Parameter is attempted. Before the value is returned it is allowed to initialize this Session Parameter, so it is passed in the SessionParametersSetting parameter.
In your case the first Session Parameter which is accessed is the CurrentUser that is why you see only it. Usually all parameters are initialized in the first call of the SessionParametersSetting procedure, but if you have many hardly calculated Session Parameters you might want to initialize them only when needed to make the startup faster. Also it is possible that not all Session Parameters are used for some users or most operations, in that case it is usable too.

 
Subscribe
Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.