CreateWoForALine(Int32,String,String,Int32,String,Double,Nullable<Double>,Nullable<DateTime>,Nullable<DateTime>) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The CreateWoForALine() method adds a work order for a line to the WO table.
This method creates jobs for all of the entities defined on the specified line. This method does not use a process. For creating work orders against a process, use the CreateWoFromProcess() method in the JobExec class.
'Declaration
Public Overloads Shared Sub CreateWoForALine( _
ByVal sessionId As Integer, _
ByVal woId As String, _
ByVal woDesc As String, _
ByVal targetSchedLineId As Integer, _
ByVal itemId As String, _
ByVal startQty As Double, _
ByVal reqqty As Nullable(Of Double), _
ByVal releaseTimeLocal As Nullable(Of Date), _
ByVal reqFinishTimeLocal As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim woId As String
Dim woDesc As String
Dim targetSchedLineId As Integer
Dim itemId As String
Dim startQty As Double
Dim reqqty As Nullable(Of Double)
Dim releaseTimeLocal As Nullable(Of Date)
Dim reqFinishTimeLocal As Nullable(Of Date)
WO.CreateWoForALine(sessionId, woId, woDesc, targetSchedLineId, itemId, startQty, reqqty, releaseTimeLocal, reqFinishTimeLocal)
public static void CreateWoForALine(
int sessionId,
string woId,
string woDesc,
int targetSchedLineId,
string itemId,
double startQty,
Nullable<double> reqqty,
Nullable<DateTime> releaseTimeLocal,
Nullable<DateTime> reqFinishTimeLocal
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- woId
- Required. Holds the ID of the work order that is being added.
- woDesc
- Optional. Holds the work order description.
- targetSchedLineId
- Required. Holds the ID of the line to which the work order is assigned.
- itemId
- Required. Holds the ID of the item for the work order.
- startQty
- Required. Holds the start quantity.
- reqqty
- Optional. Holds the required item quantity. Defaults to 0, if null is passed.
- releaseTimeLocal
- Optional. Holds the entity's local date/time when the work order will be released.
- reqFinishTimeLocal
- Optional. Holds the entity's local date/time by when the work order must be completed.