Venice
Purch::SeekByDocDate
 
Seeks a Purchase Document by its document date.
 
VARIANT_BOOL SeekByDocDate (
    enum eSeekMode eSeekMode,
    DATE dDocDate
)
 
Key information
This method uses key number 5 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pDocDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
dDocDate
[in] The document date of the Purchase Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePurch
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all Purchase Documents with document date = 28/06/2024
COleDateTime odtDocDate;
odtDocDate.SetDate (2024, 6, 28);
pPurch->SeekByDocDate (smEqual, odtDocDate);
while (pPurch->GetDBStatus () == 0 && (DATE)pPurch->pDocDate == odtDocDate)
{
    // Process record data

    pPurch->GetNext ();
}

C#
 
// Seek all Purchase Documents with document date = 28/06/2024
DateTime dtDocDate = new DateTime (2024, 6, 28);
oPurch.SeekByDocDate (eSeekMode.smEqual, dtDocDate);
while (oPurch.GetDBStatus () == 0 && (DateTime)oPurch.pDocDate == dtDocDate)
{
    // Process record data
    
    oPurch.GetNext ();
}

VBS
 
' Seek all Purchase Documents with document date = 28/06/2024
Dim dtDocDate
dtDocDate = #6/28/2024#
Call oPurch.SeekByDocDate(smEqual, dtDocDate)
While oPurch.GetDBStatus() = 0 And oPurch.pDocDate = dtDocDate
    ' Process record data

    Call oPurch.GetNext()
Wend

VB.NET
 
' Seek all Purchase Documents with document date = 28/06/2024
Dim dtDocDate As Date
dtDocDate = #6/28/2024#
oPurch.SeekByDocDate(eSeekMode.smEqual, dtDocDate)
While oPurch.GetDBStatus() = 0 And oPurch.pDocDate = dtDocDate
    ' Process record data

    oPurch.GetNext()
End While