gtINStockItemDimension
Use this function to assign dimensions to inventory items. Actual dimensions can be created using the gtINDimension function.
Company
Enter the code of the company that the inventory item is created in.
StockItem
Enter the inventory item code. An inventory item with this code must already exist with the nominated company. If the item doesn't exist, an error is returned.
DimensionType
Enter the name of the dimension type of the dimension being assigned. If the dimension type doesn't exist, an error message is returned.
Dimension
Enter the dimension (code) being assigned to the inventory item.
- If the dimension doesn't relate to the nominated dimension type, an error message is returned.
- If the dimension does exist, but is flagged as inactive in Greentree Desktop an error message is returned.
Conversion
Enter the conversion factor to apply to the dimension for this inventory item. This is a decimal value which is applied as a multiply factor to any dimension quantities entered to convert them to the stocking unit of measure of a dimensioned inventory item.
- Up to eight decimal places may be specified.
- If this parameter is left empty the default value assigned to the (generic) dimension in the database is applied.
Returns
- Not Updated - when no error is encountered
- Updated - after running the update function
- Error message - if an error is encountered
Errors Returned
- Company is a mandatory parameter
- Stock Item is a mandatory parameter
- Stock Item must already exist (in nominated company)
- Stock item must be active
- Stock item must be dimensioned
- Dimension Type is a mandatory parameter
- Dimension Type must already exist
- Dimension is a mandatory parameter
- Dimension must relate to nominated dimension type
- Dimension must be active
- Conversion factor must be greater than zero