CreateWoForALine(Int32,String,String,Int32,String,Double,Nullable<Double>,Nullable<DateTime>,Nullable<DateTime>,Nullable<Int32>,String,String,String,String) 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.
This overload of the method includes the following input parameters:
- woPriority
- custInfo
- moId
- prodSchedId
- notes
'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), _
ByVal woPriority As Nullable(Of Integer), _
ByVal custInfo As String, _
ByVal moId As String, _
ByVal prodSchedId As String, _
ByVal notes As String _
)
'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)
Dim woPriority As Nullable(Of Integer)
Dim custInfo As String
Dim moId As String
Dim prodSchedId As String
Dim notes As String
WO.CreateWoForALine(sessionId, woId, woDesc, targetSchedLineId, itemId, startQty, reqqty, releaseTimeLocal, reqFinishTimeLocal, woPriority, custInfo, moId, prodSchedId, notes)
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,
Nullable<int> woPriority,
string custInfo,
string moId,
string prodSchedId,
string notes
)
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.
- woPriority
- Optional. Holds an integer that identifies the priority for the work order.
- custInfo
- Optional. Holds the work order's customer information.
- moId
- Optional. Holds the manufacturing order for the work order.
- prodSchedId
- Optional. Holds the ID of the production schedule to which the work order belongs.
- notes
- Optional. Holds notes about the work order.