PInvce::SeekByDocDate (Interface: PInvce)
 
Seeks a Purchase Invoice by its document date.
 
VARIANT_BOOL SeekByDocDate (
    enum eSeekMode eSeekMode,
    DATE dDocDate,
    BSTR bsBook,
    LONG lDocNum
)
 
Key information
This method uses key number 3 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pDocDateDATE (date)Ascending-
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
dDocDate
[in] The document date of the Purchase Invoice you want to seek.
bsBook
[in] The book code of the Purchase Invoice you want to seek.
lDocNum
[in] The document number of the Purchase Invoice you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePInvce
 
Samples
 
C++
 
// Seek the document with document date = 28/06/2024 and book code = 'Book' and document number = 12
if (pPInvce->SeekByDocDate (smEqual, COleDateTime (2024, 6, 28, 0, 0, 0).m_dt, "Book", 12))
    // Process record data

C#
 
// Seek the document with document date = 28/06/2024 and book code = 'Book' and document number = 12
if (oPInvce.SeekByDocDate (eSeekMode.smEqual, new DateTime (2024, 6, 28), "Book", 12))
    // Process record data

VBS
 
' Seek the document with document date = 28/06/2024 and book code = 'Book' and document number = 12
If oPInvce.SeekByDocDate(smEqual, #6/28/2024#, "Book", 12) Then
    ' Process record data
End If

VB.NET
 
' Seek the document with document date = 28/06/2024 and book code = 'Book' and document number = 12
If oPInvce.SeekByDocDate(eSeekMode.smEqual, #6/28/2024#, "Book", 12) Then
    ' Process record data
End If