PrepareProductionAttributesByEntName(Int32,Nullable<DateTime>,String,String,String,String,String,String,String,String,String,Nullable<Double>,Nullable<Int32>,Nullable<Double>,Nullable<Double>,String,Nullable<Double>,Nullable<Boolean>,Nullable<Boolean>,String,String,Nullable<Int32>,String) Method
- Last UpdatedMar 17, 2026
- 4 minute read
The PrepareProductionAttributesByEntName() method passes a set of values for all production attributes and creates the required entity, item class, item, work order, and thus the job in the database to support logging utilization events against these attributes. For this method, the entity is specified by its name and site.
This overload of the method includes the eventTime (based on the entity's local timezone) and autoStartJob attributes.
'Declaration
Public Overloads Shared Sub PrepareProductionAttributesByEntName( _
ByVal sessionId As Integer, _
ByVal eventTime As Nullable(Of Date), _
ByVal entName As String, _
ByVal siteName As String, _
ByVal itemId As String, _
ByVal itemClassId As String, _
ByVal itemUOM As String, _
ByVal woId As String, _
ByVal moId As String, _
ByVal productionScheduleId As String, _
ByVal operId As String, _
ByVal targetProdRate As Nullable(Of Double), _
ByVal unitOfMeasure As Nullable(Of Integer), _
ByVal batchSize As Nullable(Of Double), _
ByVal startQuantity As Nullable(Of Double), _
ByVal userId As String, _
ByVal reqdQuantity As Nullable(Of Double), _
ByVal updateInventory As Nullable(Of Boolean), _
ByVal invUniqueByJob As Nullable(Of Boolean), _
ByVal processId As String, _
ByVal bomVerId As String, _
ByVal autoStartJob As Nullable(Of Integer), _
ByRef warningMessages As String _
)
'Usage
Dim sessionId As Integer
Dim eventTime As Nullable(Of Date)
Dim entName As String
Dim siteName As String
Dim itemId As String
Dim itemClassId As String
Dim itemUOM As String
Dim woId As String
Dim moId As String
Dim productionScheduleId As String
Dim operId As String
Dim targetProdRate As Nullable(Of Double)
Dim unitOfMeasure As Nullable(Of Integer)
Dim batchSize As Nullable(Of Double)
Dim startQuantity As Nullable(Of Double)
Dim userId As String
Dim reqdQuantity As Nullable(Of Double)
Dim updateInventory As Nullable(Of Boolean)
Dim invUniqueByJob As Nullable(Of Boolean)
Dim processId As String
Dim bomVerId As String
Dim autoStartJob As Nullable(Of Integer)
Dim warningMessages As String
Ent.PrepareProductionAttributesByEntName(sessionId, eventTime, entName, siteName, itemId, itemClassId, itemUOM, woId, moId, productionScheduleId, operId, targetProdRate, unitOfMeasure, batchSize, startQuantity, userId, reqdQuantity, updateInventory, invUniqueByJob, processId, bomVerId, autoStartJob, warningMessages)
public static void PrepareProductionAttributesByEntName(
int sessionId,
Nullable<DateTime> eventTime,
string entName,
string siteName,
string itemId,
string itemClassId,
string itemUOM,
string woId,
string moId,
string productionScheduleId,
string operId,
Nullable<double> targetProdRate,
Nullable<int> unitOfMeasure,
Nullable<double> batchSize,
Nullable<double> startQuantity,
string userId,
Nullable<double> reqdQuantity,
Nullable<bool> updateInventory,
Nullable<bool> invUniqueByJob,
string processId,
string bomVerId,
Nullable<int> autoStartJob,
out string warningMessages
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- eventTime
- Optional. Holds the event time.
- entName
- Required. Holds the name of the entity where the job is intended to run.
- siteName
- Required. Holds the name of the site linked to this entity.
- itemId
- Required. Holds the ID of the item for this data entry job.
- itemClassId
- Required. Holds the ID of the item class for this data entry job.
- itemUOM
- Required. Holds the unit of measurement for this item.
- woId
- Required. Holds the ID of the work order for this data entry job.
- moId
- Required. Holds the ID of the manufacturing order.
- productionScheduleId
- Required. Holds the ID of the production schedule.
- operId
- Required. Holds the ID of the operation for this data entry job.
- targetProdRate
- Optional. Holds the target production rate for this data entry job.
- unitOfMeasure
- Required. Holds an enumeration value that identifies the unit of measurement for the target production rate. See the ProdUnitOfMeasure enumeration in the FactMES.API.Prod namespace section.
- batchSize
- Optional. Holds the batch size for this data entry job.
- startQuantity
- Optional. Holds the starting quantity for this data entry job.
- userId
- Required. Holds the ID of the user associated with this entity.
- reqdQuantity
- Optional. Holds the quantity that is required. If not using this parameter, set it to null.
- updateInventory
- Optional. Holds a flag that, if set to true, specifies that inventory will be updated with item production by this job.
- invUniqueByJob
- Optional. Holds a flag that, if set to true, specifies that the inventory assigned to the job can be used only with this job.
- processId
- Optional. Holds the process ID.
- bomVerId
- Optional. Holds the BOM version ID.
- autoStartJob
- Optional. Holds the enumerated value for the Auto Job Start option:
0 = Do Not Auto Start Next
1 = Auto Start Next When Ready
2 = Auto Start Next Based on Tag - warningMessages
- Output. Holds a warning message returned by the middleware after executing this method.