LogOnEntList(Int32,String,LogOnEntListStandardListId,Nullable<DateTime>,String) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The LogOnEntList() method logs the specified user within a session on to their default entities, last saved entities, or a specified list of entities.
If an entity list is being specified, this overload of the method specifies the list of entities by the list ID enumeration.
'Declaration
Public Overloads Shared Sub LogOnEntList( _
ByVal sessionId As Integer, _
ByVal userId As String, _
ByVal listId As LogOnEntListStandardListId, _
ByVal logOnTime As Nullable(Of Date), _
ByRef xmlLogOnFailures As String _
)
'Usage
Dim sessionId As Integer
Dim userId As String
Dim listId As LogOnEntListStandardListId
Dim logOnTime As Nullable(Of Date)
Dim xmlLogOnFailures As String
Session.LogOnEntList(sessionId, userId, listId, logOnTime, xmlLogOnFailures)
public static void LogOnEntList(
int sessionId,
string userId,
LogOnEntListStandardListId listId,
Nullable<DateTime> logOnTime,
out string xmlLogOnFailures
)
Parameters
- sessionId
Required. Holds the session ID and thus the user who is making this method call.
- userId
- Required. Holds the ID of the user who is being logged on.
- listId
Required. Holds a LogOnEntListStandardListId enumeration that is used to identify from where the list of entities is retrieved.
For Default and LastSaved, the entities are retrieved from the Ent_Logon_List table.
For AllAccessible, the entities are retrieved from the Grp_Ent_Link table.
- logOnTime
Optional. Holds the actual date/time the logon took place, to be entered in the Ent_Logon table. If null, defaults to the current time.
Passing a time for this parameter is useful when importing logon data from external timekeeping systems.
NOTE: The supplied date/time must be before the current time; if it is not, the current time is used.
- xmlLogOnFailures
- Output. Holds the returned error message if an error occurs during the execution of this method.
This user must be the current active user on the session, achieved by Starting the session or using the SwitchUser() method to become the active user on the session.
The entity lists and the cur_lab_cd and pct_lab_to_apply values for each entity in the list are saved in the Ui_Config table and are retrieved from there for this purpose.
If logging on from a predefined list, then the user is first logged off any entities they are currently logged on to for this session.
If specifying a custom list, then this method attempts to log onto the listed entities without first logging the user off any entities that they are currently logged onto for this session. This allows the client application to incrementally log on to groups of entities for a given user, if required.
The method inserts appropriate entries into the Ent_Logon table – one row per entity in the list. If the Certification option is licensed and an entity that already has a job running is logged onto, then the certification check to see that this user can run this job is performed. An error is returned if this user is not certified to run this job.
If the optional logOnTime attribute is included in a custom logon list, then its value must be before the current time; otherwise, the current time will be used instead. If a valid logOnTime is included, then all logon and labor tracking data will be based on this specified time.