ReadyJob Method
- Last UpdatedNov 06, 2025
- 1 minute read
The ReadyJob() method changes the state of the specified job to Ready. The job is specified by a work order ID, an operation ID, and an operation sequence number.
Parameters
- woId
- Required. Holds the job's work order ID.
- operId
- Required. Holds the job's operation ID.
- seqNo
- Required. Holds the job's operation sequence number.
- editTime
- Required. Holds the timestamp for the last edit of this job. If this does not match the timestamp currently in the database, the job cannot be changed.
The following is an example of how to use this method:
Dim entMain as aaFactMES.aaEnt;
Dim jobexecMain As aaFactMES.aaJobExec;
Dim drMain as System.Data.DataRow;
Dim strMain as System.String;
'the following line will only work if you are logged into one entity; else you can use a different method
entMain = clientSession.curUser.curEnt;
'get all relevant data about the job. Format is GetJob(wo_id,Oper_id,Seq_no)
result = aaFactMES.aaJobs.GetJob("WO_1", "Operation_001", 0);
drMain = result.value;
'strip the edit_time from the datarow returned
strMain = drMain.Item("edit_time").ToString;
'set the job_exec variable = to the current entity job_exec
jobexecMain = entMain.JobExec;
'ready the job using the edit_time variable. Format is ReadyJob(wo_id,oper_id,seq_no,edit_date)
jobexecMain.ReadyJob("WO_1", "Operation_001", 0, strMain);