Click or drag to resize

ResourceServicesDefineStockLocations Method

Defines the StockLocations for a pre-existing Stock, TemperingOven or ColdStorage. Any and all pre-existing StockLocations associated with the resource will be deleted, and replaced by the new StockLocations. The method will fail if there are existing StockLocations that contain inventory (Items).

Namespace:  FactoryLogix.xTend.FactoryResources
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public void DefineStockLocations(
	Guid sessionId,
	Guid resourceId,
	StockLocation[] stockLocations
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
resourceId
Type: SystemGuid
The Id of the Stock, TemperingOven or ColdStorage whose StockLocations are to be defined. If the Id specified not one of these types, the methods will fail.
stockLocations
Type: FactoryLogix.xTend.DataObjectsStockLocation
A list of the new StockLocations for the resource.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
ResourceNotFoundExceptionThrown if the resourceId parameter is invalid or does not represent a valid resource type.
RelatedItemExceptionThrown if one or more of the pre-existing stock locations of the resource cannot be deleted because they contain Items.
AlreadyExistsExceptionThrown if StockCode property of any of the stock locations conflicts with another StockLocation.
NotFoundExceptionThrown if assigning parts that do not exist in the part library.
See Also