Add Method (ShiftPatternEntLink)
- Last UpdatedNov 06, 2025
- 2 minute read
The Add() method adds a new shift pattern-entity link record to the Shift_Pattern_Ent_Link table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal shiftSchedEntId As Integer, _
ByVal entId As Integer, _
ByVal patternId As Integer, _
ByRef lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim shiftSchedEntId As Integer
Dim entId As Integer
Dim patternId As Integer
Dim lastEditAt As Nullable(Of Date)
ShiftPatternEntLink.Add(sessionId, shiftSchedEntId, entId, patternId, lastEditAt)
public static void Add(
int sessionId,
int shiftSchedEntId,
int entId,
int patternId,
out Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- shiftSchedEntId
Required. Holds the ID of the entity that supplies the shift schedule for the entity being linked (i.e., the entity identified by entId).
For regular shift patterns, the shiftSchedEntId entity and the entId entity will be the same entity.
For holiday and overtime shift patterns, the entities will be different if the pattern is being linked to an entity that cannot schedule shifts. In that case, the shiftSchedEntId entity will be the nearest ancestor entity that can schedule shifts for the entId entity.
- entId
Required. Holds the ID of the entity that is being linked to the shift pattern.
For a regular shift pattern, the entId entity will be the same as the shiftSchedEntID entity.
For holiday and overtime shift patterns, the entities will be different if the pattern is being linked to an entity that cannot schedule shifts. In that case, the shiftSchedEntId entity will be the nearest ancestor entity that can schedule shifts for the entId entity.
- patternId
- Required. The ID of the shift pattern that is being linked.
- lastEditAt
- Output. Holds the returned datetime when this record was added. The lastEditAt parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.