Click or drag to resize

BatchServicesCreateBatch Method

Creates a new production or receiving batch (GRN). If the type of the new batch is BatchType.Production, then the ProcessId property must align with a valid production process for the new Batch. If the type of the new batch is BatchType.Receiving, then the ProcessId property must align with a valid receiving process for the new Batch.

Namespace:  FactoryLogix.xTend.Production
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public Batch CreateBatch(
	Guid sessionId,
	Batch newBatch
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
newBatch
Type: FactoryLogix.xTend.DataObjectsBatch
A Batch object describing the properties of the new Batch.

Return Value

Type: Batch
A fully populated Batch object representing the new batch, with valid Id property.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
ProcessDoesNotExistExceptionThrown if a Process referenced by the batch does not exist in the system, or is otherwise invalid.
ProcessNotReleasedForProductionExceptionThrown if a Process referenced by the batch is not released for productoin.
BatchExceptionThrown when a Batch cannot be created such as duplicating the name.
InvalidQuantityVerificationModeExceptionThrown when using a quantity verification mode that is not valid for the Batch type.
UnitOfIssueExceptionThrown if there is an error processing the Batch's UnitOfIssue.
See Also