AddEntShift Method
- Last UpdatedNov 06, 2025
- 2 minute read
The AddEntShift() method adds a shift to the shift schedule of the specified entity if the entity can schedule shifts.
Note: This method is no longer supported. Use the corresponding method in the Stateless API ShiftSchedule class.
'Declaration
<ObsoleteAttribute("Shifts.AddEntShift method is no longer supported. Please call the corresponding updated method.")>
Public Shared Function AddEntShift( _
ByVal entID As Integer, _
ByVal startDay As Long, _
ByVal shiftID As Long, _
ByVal shiftStart As Date, _
ByVal shiftEnd As Date, _
ByVal break1Start As Fact.Common.DBDateTime, _
ByVal break1End As Fact.Common.DBDateTime, _
ByVal break2Start As Fact.Common.DBDateTime, _
ByVal break2End As Fact.Common.DBDateTime, _
ByVal break3Start As Fact.Common.DBDateTime, _
ByVal break3End As Fact.Common.DBDateTime _
) As Date
[Obsolete("Shifts.AddEntShift method is no longer supported. Please call the corresponding updated method.")]
public static DateTime AddEntShift(
int entID,
long startDay,
long shiftID,
DateTime shiftStart,
DateTime shiftEnd,
Fact.Common.DBDateTime break1Start,
Fact.Common.DBDateTime break1End,
Fact.Common.DBDateTime break2Start,
Fact.Common.DBDateTime break2End,
Fact.Common.DBDateTime break3Start,
Fact.Common.DBDateTime break3End
)
Parameters
- entID
Required. Holds the ID of the entity for which a shift is being added to the shift schedule.
- startDay
Required. Holds the day of the week when the shift applies (0=Sunday, 6=Saturday).
- shiftID
Required. Holds the ID of the system shift for the entity shift schedule.
- shiftStart
Required. Holds the DateTime containing the time that the shift starts for the entity shift schedule (the date is ignored).
- shiftEnd
Required. Holds the DateTime containing the time that the shift ends for the entity shift schedule (the date is ignored).
- break1Start
Optional. Holds the DateTime containing the time that the first break starts for the shift (the date is ignored).
- break1End
Optional. Holds the DateTime containing the time that the first break ends for the shift (the date is ignored).
- break2Start
Optional. Holds the DateTime containing the time that the second break starts for the shift (the date is ignored).
- break2End
Optional. Holds the DateTime containing the time that the second break ends for the shift (the date is ignored).
- break3Start
Optional. Holds the DateTime containing the time that the third break starts for the shift (the date is ignored).
- break3End
Optional. Holds the DateTime containing the time that the third break ends for the shift (the date is ignored).
Return Value
Returns a DateTime with the date and time the shift was added to the entity's shift schedule.