CopyShifts Method
- Last UpdatedMar 17, 2026
- 2 minute read
The CopyShifts() method copies shifts from a source entity to one or more destination entities.
Note: This method is no longer supported. To link entities to shift patterns, use the AddMany() method in the ShiftPatternEntLink class.
'Declaration
<ObsoleteAttribute("Ent.CopyShifts method is no longer supported. To link entities to shift patterns, use the AddMany method in the ShiftPatternEntLink class.")>
Public Shared Sub CopyShifts( _
ByVal sessionId As Integer, _
ByVal sourceEntId As Integer, _
ByVal destEntList As String, _
ByVal shiftIdList As String _
)
[Obsolete("Ent.CopyShifts method is no longer supported. To link entities to shift patterns, use the AddMany method in the ShiftPatternEntLink class.")]
public static void CopyShifts(
int sessionId,
int sourceEntId,
string destEntList,
string shiftIdList
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- sourceEntId
- Required. Holds the ID of the source entity from which the shift data will be copied.
- destEntList
- Required. Holds a comma-delimited list of the IDs of the destination entities to which the shift data will be copied. For example:1,112,3122.
- shiftIdList
- Optional. Holds a comma-delimited list of ordered pairs representing the specific start days and shift IDs to be copied. The first number in each pair represents the start day. The second number represents the shift ID. The two numbers are separated by a colon. For example: 0:1,0:2,0:3.
Given a source entity and a list of destination entities, this method replaces the shift data of the destination entities with the shift data from the source entity. The canSchedShifts flag for all destination entities must be set to true for the call to succeed.
The specific list of shifts to copy is optional. If a list of shifts to copy is not supplied, all shift information from the source entity will be copied to the destination entities.