SOffer::SeekByDocDate (Interface: SOffer)
 
Seeks a Sales Offer by its document date.
 
VARIANT_BOOL SeekByDocDate (
    enum eSeekMode eSeekMode,
    DATE dDocDate,
    LONG lSysNum
)
 
Key information
This method uses key number 4 (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.
dDocDate
[in] The document date of the Sales Offer you want to seek.
lSysNum
[in] The system number of the Sales Offer you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSOffer
 
Samples
 
C++
 
// Seek all the sales offers with document date = 28/06/2024
COleDateTime odtDocDate;
odtDocDate.SetDate (2024, 6, 28);
pSOffer->SeekByDocDate (smGreaterOrEqual, odtDocDate, 0);
while (pSOffer->GetDBStatus () == 0 && (DATE)pSOffer->pDocDate == odtDocDate)
{
    // Process record data

    pSOffer->GetNext ();
}

C#
 
// Seek all the sales offers with document date = 28/06/2024
DateTime dtDocDate = new DateTime (2024, 6, 28);
oSOffer.SeekByDocDate (eSeekMode.smGreaterOrEqual, dtDocDate, 0);
while (oSOffer.GetDBStatus () == 0 && (DateTime)oSOffer.pDocDate == dtDocDate)
{
    // Process record data

    oSOffer.GetNext ();
}

VBS
 
' Seek all the sales offers with document date = 28/06/2024
Dim dtDocDate
dtDocDate = #6/28/2024#
Call oSOffer.SeekByDocDate(smGreaterOrEqual, dtDocDate, 0)
While oSOffer.GetDBStatus() = 0 And oSOffer.pDocDate = dtDocDate
    ' Process record data

    Call oSOffer.GetNext()
Wend

VB.NET
 
' Seek all the sales offers with document date = 28/06/2024
Dim dtDocDate As Date
dtDocDate = #6/28/2024#
oSOffer.SeekByDocDate(eSeekMode.smGreaterOrEqual, dtDocDate, 0)
While oSOffer.GetDBStatus() = 0 And oSOffer.pDocDate = dtDocDate
    ' Process record data

    oSOffer.GetNext()
End While