SetRawReason Method (LaborExec)
- Last UpdatedNov 06, 2025
- 1 minute read
The SetRawReason() method sets the current labor reason code for the specified entity based on a raw reason code received directly from the I/O system. This raw reason code will specify a default ‘labor_code’ for all users who are currently logged onto this entity.
'Declaration
Public Shared Sub SetRawReason( _
ByVal sessionId As Integer, _
ByVal entId As Integer, _
ByVal rawReasCd As String, _
ByVal newReasStart As Nullable(Of Date), _
ByVal comments As DBString _
)
public static void SetRawReason(
int sessionId,
int entId,
string rawReasCd,
Nullable<DateTime> newReasStart,
DBString comments
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entId
- Required. Holds the ID of the entity.
- rawReasCd
- Required. Holds the new raw reason code.
- newReasStart
- Optional. Holds the timestamp to which the new raw reason applies. If null is passed, defaults to the current date and time.
- comments
- Optional. A string value that provides more information for the new reason.
This method first reads the Labor_Raw_Reas table to get the default labor code for the new raw reason that is being applied. If the supplied raw reason has a valid non-null labor code linked to it, then this method applies the default labor code to all the users who has logged onto the specified entity.