Venice
Sales::SeekByDocDate
 
Seeks a Sales 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 Sales Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSales
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all Sales Documents with document date = 28/06/2024
COleDateTime odtDocDate;
odtDocDate.SetDate (2024, 6, 28);
pSales->SeekByDocDate (smEqual, odtDocDate);
while (pSales->GetDBStatus () == 0 && (DATE)pSales->pDocDate == odtDocDate)
{
    // Process record data

    pSales->GetNext ();
}

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

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

    Call oSales.GetNext()
Wend

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

    oSales.GetNext()
End While