Year::CreateStockDocDet (Interface: Year)
 
Creates a Stock Document Detail line object.
 
IStockDocDet* CreateStockDocDet (
    VARIANT_BOOL bCanChange
)
 
Parameters
bCanChange
[in] True if you want to make changes (perform inserts, updates or deletes) to the object you are creating, otherwise false.
 
Remarks
How to explicitly destroy this object?
C++
pStockDocDet = NULL
The object is destroyed immediately.
C#
System.Runtime.InteropServices.Marshal.ReleaseComObject(oStockDocDet)
oStockDocDet = null
By assigning the object to null the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
VBS
Set oStockDocDet = Nothing
The object is destroyed immediately.
VBN
System.Runtime.InteropServices.Marshal.ReleaseComObject(oStockDocDet)
oStockDocDet = Nothing
By assigning the object to Nothing the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
 
See Also
CreateYearContext
 
Samples
 
C++
 
IStockDocDetPtr pStockDocDet = pYear->CreateStockDocDet (VARIANT_TRUE);

C#
 
StockDocDet oStockDocDet = oYear.CreateStockDocDet (true);

VBS
 
Dim oStockDocDet
Set oStockDocDet = oYear.CreateStockDocDet(True)

VB.NET
 
Dim oStockDocDet As ClSdk.StockDocDet
oStockDocDet = oYear.CreateStockDocDet(True)