CatCartLine.initFromProduct Method
Initializes a CatCartLine record by using the specified product.
Syntax
public CatDistinctProductReference initFromProduct(EcoResDistinctProduct _ecoResDistinctProduct)
Run On
Called
Parameters
- _ecoResDistinctProduct
Type: EcoResDistinctProduct Table
An EcoResDistinctProduct value to which the line should refer.
Return Value
Type: CatDistinctProductReference Table
A record in the CatDistinctProductReference table.
Remarks
This method creates a CatDistinctProductReference record with its DistinctProduct field set to the value in the specified EcoResDistinctProduct record. It also sets the ProductReference field of the line to the previous record, and sets the UnitOfMeasure field of the line to that of the InventTableModule for the item ID of the given EcoResDistinctProduct record.
This method sets the ProcurementCategory field of the line.