UpdateJobExec(Int32,Int32,Nullable<Boolean>,Nullable<Boolean>,DBString,DBInt,DBInt,DBInt,Nullable<Int32>,DBInt,DBString,DBString,Nullable<Boolean>,Nullable<Int32>,Nullable<Int32>,Nullable<Int32>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,DBString,DBString,DBInt,DBInt,DBDateTime,DBString,DBString,DBString,DBString,Nullable<DateTime>) Method
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateJobExec() method updates the job exec record for the specified job position for the specified entity. This overload of the method includes a lastEditAt DateTime parameter that can be used for optimistic concurrency control.
'Declaration
Public Overloads Shared Sub UpdateJobExec( _
ByVal EntID As Integer, _
ByVal JobPos As Integer, _
ByVal NextJobOnly As Nullable(Of Boolean), _
ByVal ItemBasedDesc As Nullable(Of Boolean), _
ByVal JobEndConfirmMessage As Fact.Common.DBString, _
ByVal DefToEntID As Fact.Common.DBInt, _
ByVal DefRejectEntID As Fact.Common.DBInt, _
ByVal DefFromEntID As Fact.Common.DBInt, _
ByVal DefProdReasCD As Nullable(Of Integer), _
ByVal DefConsReasCD As Fact.Common.DBInt, _
ByVal DefLotNo As Fact.Common.DBString, _
ByVal DefSubLotNo As Fact.Common.DBString, _
ByVal AutoloadJobSpecs As Nullable(Of Boolean), _
ByVal AutoSeqStartOpt As Nullable(Of Integer), _
ByVal AutoJobStartOpt As Nullable(Of Integer), _
ByVal AutoJobEndOpt As Nullable(Of Integer), _
ByVal InclClassReas As Nullable(Of Boolean), _
ByVal MustCompleteSteps As Nullable(Of Boolean), _
ByVal MustProdReqdQty As Nullable(Of Boolean), _
ByVal LocalMovableConsEnt As Nullable(Of Boolean), _
ByVal LocalMovableProdEnt As Nullable(Of Boolean), _
ByVal RunWithoutOperator As Nullable(Of Boolean), _
ByVal ApplyPostExecFCCounts As Nullable(Of Boolean), _
ByVal SuppressStartSomePrompt As Nullable(Of Boolean), _
ByVal AllowZeroQtySplit As Nullable(Of Boolean), _
ByVal AutoAllocQtyToRunningJob As Nullable(Of Boolean), _
ByVal CurWOID As Fact.Common.DBString, _
ByVal CurOperID As Fact.Common.DBString, _
ByVal CurSeqNo As Fact.Common.DBInt, _
ByVal CurStepNo As Fact.Common.DBInt, _
ByVal CurStepStart As Fact.Common.DBDateTime, _
ByVal spare1 As Fact.Common.DBString, _
ByVal spare2 As Fact.Common.DBString, _
ByVal spare3 As Fact.Common.DBString, _
ByVal spare4 As Fact.Common.DBString, _
ByVal lastEditAt As Nullable(Of Date) _
)
public static void UpdateJobExec(
int EntID,
int JobPos,
Nullable<bool> NextJobOnly,
Nullable<bool> ItemBasedDesc,
Fact.Common.DBString JobEndConfirmMessage,
Fact.Common.DBInt DefToEntID,
Fact.Common.DBInt DefRejectEntID,
Fact.Common.DBInt DefFromEntID,
Nullable<int> DefProdReasCD,
Fact.Common.DBInt DefConsReasCD,
Fact.Common.DBString DefLotNo,
Fact.Common.DBString DefSubLotNo,
Nullable<bool> AutoloadJobSpecs,
Nullable<int> AutoSeqStartOpt,
Nullable<int> AutoJobStartOpt,
Nullable<int> AutoJobEndOpt,
Nullable<bool> InclClassReas,
Nullable<bool> MustCompleteSteps,
Nullable<bool> MustProdReqdQty,
Nullable<bool> LocalMovableConsEnt,
Nullable<bool> LocalMovableProdEnt,
Nullable<bool> RunWithoutOperator,
Nullable<bool> ApplyPostExecFCCounts,
Nullable<bool> SuppressStartSomePrompt,
Nullable<bool> AllowZeroQtySplit,
Nullable<bool> AutoAllocQtyToRunningJob,
Fact.Common.DBString CurWOID,
Fact.Common.DBString CurOperID,
Fact.Common.DBInt CurSeqNo,
Fact.Common.DBInt CurStepNo,
Fact.Common.DBDateTime CurStepStart,
Fact.Common.DBString spare1,
Fact.Common.DBString spare2,
Fact.Common.DBString spare3,
Fact.Common.DBString spare4,
Nullable<DateTime> lastEditAt
)
Parameters
- EntID
- Required. Holds the ID of the entity that contains the job exec to be updated.
- JobPos
- Required. Holds the job position for the job position to be updated.
- NextJobOnly
- Optional. Holds a flag that, if set to true, causes only the next job to be started. If the flag is set to false, any job can be started.
- ItemBasedDesc
- Optional. Holds a flag that, if set to true, causes messages to use the item description. If the flag is set to false, messages will use the operation description.
- JobEndConfirmMessage
- Optional. Holds the string used for the job end confirmation message.
- DefToEntID
- Optional. Holds the ID of the default storage entity for good production items, and rejects if def_reject_ent_id is null.
- DefRejectEntID
- Optional. Holds the ID of the default storage entity for reject production.
- DefFromEntID
- Optional. Holds the ID of the default storage entity for item issues.
- DefProdReasCD
- Optional. Holds the code for the default reason for good production.
- DefConsReasCD
- Optional. Holds the code for the default reason for normal consumption.
- DefLotNo
- Optional. Holds the default lot number for production.
- DefSubLotNo
- Optional. Holds the default sublot number for production.
- AutoloadJobSpecs
- Optional. Holds a flag that, if set to true, causes job specs to be automatically loaded to tags.
- AutoSeqStartOpt
- Optional. Holds an enumeration of conditions that specifies whether to automatically start the job with the current work order and operation, and with the next sequence number, when the previous job is done. 0 = Do not automatically start the job (the default condition). 1 = Automatically start the job when the previous job is done.
- AutoJobStartOpt
- Optional. Holds an enumeration of conditions that specifies whether to automatically start a job. 0 = Do not automatically start the job. 1 = Start the next scheduled job as soon as it is ready. 2 = Start the next scheduled job with the work order that is specified in the tag that just changed.
- AutoJobEndOpt
- Optional. Holds an enumeration of conditions that specifies whether to automatically end a job. 0 = Do not automatically end the job. 1 = Automatically end the job when qtydone >= qtyreqd.
- InclClassReas
- Optional. Holds a flag that, if set to true, indicates that item reasons for an item class should also be available to choose from if there are entity-related item reasons defined.
- MustCompleteSteps
- Optional. Holds a flag that, if set to true, specifies that all steps be completed completed/bypassed to end the job.
- MustProdReqdQty
- Optional. Holds a flag that, if set to true, specifies that the required quantity must be produced.
- LocalMovableConsEnt
- Optional. Holds a flag that, if set to true, specifies that movable storage entities that are supplying consumption need to be at/in the entity consuming it.
- LocalMovableProdEnt
- Optional. Holds a flag that, if set to true, specifies that movable storage entities that are receiving production need to be at/in the entity producing it.
- RunWithoutOperator
- Optional. Holds a flag that, if set to true, allows jobs to be run without an operator logged on to this entity.
- ApplyPostExecFCCounts
- Optional. Holds a flag that, if set to true, specifies that production counts received from a custom application when no job is running should be applied to the last job that ran on the entity.
- SuppressStartSomePrompt
- Optional. Holds a flag that, if set to true, suppresses the Start Some Qty prompt when doing Start Some.
- AllowZeroQtySplit
- Optional. Holds a flag that, if set to true, allows zero to be used as default quantities to be used for Start Some.
- AutoAllocQtyToRunningJob
- Optional. Holds a flag that, if set to true, specifies that overages in reported production are to be covered by moving quantities from a scheduled, non-running job if available.
- CurWOID
- Optional. Holds the ID of the current work order on the entity at this job position.
- CurOperID
- Optional. Holds the ID of the current operation on the entity at this job position.
- CurSeqNo
- Optional. Holds the sequence number of the current operation split on the entity at this job position.
- CurStepNo
- Optional. Holds the number of the last step started on this entity.
- CurStepStart
- Optional. Holds the DateTime when the last step was started on this entity.
- spare1
- Optional. Holds a string for the first field for additional user-defined information.
- spare2
- Optional. Holds a string for the second field for additional user-defined information.
- spare3
- Optional. Holds a string for the third field for additional user-defined information.
- spare4
- Optional. Holds a string for the fourth field for additional user-defined information.
- lastEditAt
Optional. Optional. Holds a DateTime value to avoid data contention. If it is specified, the passed value must match the lastEditAt value in the database for the update to succeed.