Available in FORMS 5-3 Service Pack 3 and later.
Returns the Batch specified by EHKey, a value previously read from the EHKey property.
Make sure that no job is running when this method is called.
The result of the operation is returned in the Result parameter.
[ReturnValue =] Object.GetBatchByKey (EHKey) Result
|
Part |
Data type |
Description |
|
Object |
Object |
An object expression that evaluates to a Batch object. |
|
EHKey |
String |
The batch you are looking for. |
|
Result |
Integer (ByRef) |
The result of the operation: 0: Batch found and returned. 1: Batch not found in the database. 2: Batch locked by another user and cannot be returned. 3: Error—no batch returned. |
Data type: Batch (Object). If the specified batch exists, the return value is that batch. If it is not found, NULL is returned.
You can use the regular Batch methods on the returned batch. However, the changes are not written to database until CommitKeyObjects is called (using the Classic API)—and it must be called even if no change was made to the batch.
When you are finished and the last batch is committed, call ReleaseKeyObjects (using the Classic API) to free memory.
You could call this method from Transfer to set the order in which batches are transferred, for example based on the date a batch was scanned or the value of a specific field.
We recommend that only advanced users call this method.
None.