Venice
StockDoc::SeekByType
 
Seeks a Stock Document by its type, book and document number.
 
VARIANT_BOOL SeekByType (
    enum eSeekMode eSeekMode,
    enum eStockDocType eStockDocType,
    BSTR bsBook,
    LONG lDocNum
)
 
Key information
This method uses key number 2 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pDocDateDATE (date)Ascending-
pSysNumLONGAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
eStockDocType
[in] A value of the 'eStockDocType' enumeration.
bsBook
[in] The book code of the stock document you want to seek.
lDocNum
[in] The document number of the stock document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateStockDoc
 
Samples
 
C++
 
// Seek the stock document of type 'Adjustment' with book code = 'Book' and document number = 12
if (pStockDoc->SeekByType (smEqual, stcAdjustment, "Book", 12))
    // Process record data

C#
 
// Seek the stock document of type 'Adjustment' with book code = 'Book' and document number = 12
if (oStockDoc.SeekByType (eSeekMode.smEqual, eStockDocType.stcAdjustment, "Book", 12))
    // Process record data

VBS
 
' Seek the stock document of type 'Adjustment' with book code = 'Book' and document number = 12
If oStockDoc.SeekByType(smEqual, stcAdjustment, "Book", 12) Then
    ' Process record data
End If

VB.NET
 
' Seek the stock document of type 'Adjustment' with book code = 'Book' and document number = 12
If oStockDoc.SeekByType(eSeekMode.smEqual, eStockDocType.stcAdjustment, "Book", 12) Then
    ' Process record data
End If