SetCurLotData(Int32,String,Int32,Nullable<Int32>,String,String,String,Nullable<Int32>,Nullable<Int32>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Int32>) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The SetCurLotData() method sets the current lot information for the running job.
This overload of the method uses the entity ID to specify the entity.
'Declaration
Public Overloads Shared Sub SetCurLotData( _
ByVal sessionId As Integer, _
ByVal userId As String, _
ByVal entId As Integer, _
ByVal bomPos As Nullable(Of Integer), _
ByVal curItemId As String, _
ByVal curLotNo As String, _
ByVal curSubLotNo As String, _
ByVal curReasCd As Nullable(Of Integer), _
ByVal curStorageEntId As Nullable(Of Integer), _
ByVal curUpdateInv As Nullable(Of Boolean), _
ByVal curBackflush As Nullable(Of Boolean), _
ByVal jobPos As Nullable(Of Integer) _
)
'Usage
Dim sessionId As Integer
Dim userId As String
Dim entId As Integer
Dim bomPos As Nullable(Of Integer)
Dim curItemId As String
Dim curLotNo As String
Dim curSubLotNo As String
Dim curReasCd As Nullable(Of Integer)
Dim curStorageEntId As Nullable(Of Integer)
Dim curUpdateInv As Nullable(Of Boolean)
Dim curBackflush As Nullable(Of Boolean)
Dim jobPos As Nullable(Of Integer)
JobExec.SetCurLotData(sessionId, userId, entId, bomPos, curItemId, curLotNo, curSubLotNo, curReasCd, curStorageEntId, curUpdateInv, curBackflush, jobPos)
public static void SetCurLotData(
int sessionId,
string userId,
int entId,
Nullable<int> bomPos,
string curItemId,
string curLotNo,
string curSubLotNo,
Nullable<int> curReasCd,
Nullable<int> curStorageEntId,
Nullable<bool> curUpdateInv,
Nullable<bool> curBackflush,
Nullable<int> jobPos
)
Parameters
- sessionId
- Required. Holds the ID of the session from which the call is being made.
- userId
- Required. Holds the ID of the user.
- entId
- Required. Holds the ID of the entity.
- bomPos
Optional. Holds the BOM position.
0 for the current main production item (the default).
> 0 for consumption items to identify the BOM component.
< 0 for by-products to identify the by-product..
- curItemId
- Optional. Holds the ID of the new item being produced or consumed for this BOM position on this entity. If omitted, the current value is not affected. This allows the current item to be changed during production if required.
- curLotNo
- Optional. Holds the new lot number for this BOM position on this entity. If omitted, the current value is not affected.
- curSubLotNo
- Optional. Holds the sublot number for the item.
- curReasCd
- Optional. Holds the new reason code (production or consumption code or waste/reject reason) for this BOM position on this entity. If omitted, the current value is not affected.
- curStorageEntId
- Optional. Holds the ID of the storage entity produced to or consumed from for this BOM position on this entity. If omitted, the current value is not affected.
- curUpdateInv
- Optional. Holds a boolean value to flag whether quantities produced or consumed at this BOM position on this entity should update inventory quantities or not. If omitted the current value is not affected.
- curBackflush
- Optional. Holds information about whether consumption is being back flushed or not.
- jobPos
- Optional. Holds the job position. If greater than 1, jobs are running on this entity.
This method is useful when quantities are received directly from PLCs on the production line, but the lot numbers, containers, etc., are specified independently of those counters.
This method does not add any production quantities. It just sets the current values so that the next time quantities are received via the AddProd() method, these values are applied (assuming they are not specified in the AddProd() method, in which case the specified values take precedence and replace these).
This method updates the values even if no job is currently running on the entity. However, when a job is started, it may have values defined that automatically set these values for that particular job. Thus its real benefit is modifying all or some of these values once a job is running on an entity.