SOrderDet::SeekByStcArtNum (Interface: SOrderDet)
 
Seeks a Sales Order Detail line by its stock article number.
 
VARIANT_BOOL SeekByStcArtNum (
    enum eSeekMode eSeekMode,
    BSTR bsArtNumStock,
    DATE dDocDate
)
 
Key information
This method uses key number 5 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pArtNumStockBSTRAscendingHierarchy
pDocDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsArtNumStock
[in] The number of the stock article of the Sales Order Detail line you want to seek.
dDocDate
[in] The document date of the Sales Order of which you want to seek a detail line.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSOrderDet
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek the data of all detail lines for the article with stock number = 'Stock' of all sales orders
CString strArtNumStock = "Stock";
pSOrderDet->SeekByStcArtNum (smGreaterOrEqual, (LPCSTR)strArtNumStock, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pSOrderDet->GetDBStatus () == 0 && (CString)pSOrderDet->pArtNumStock == strArtNumStock)
{
    // Process record data
    
    pSOrderDet->GetNext ();
}

C#
 
// Seek the data of all detail lines for the article with stock number = 'Stock' of all sales orders
string strArtNumStock = "Stock";
oSOrderDet.SeekByStcArtNum (eSeekMode.smGreaterOrEqual, strArtNumStock, new DateTime ());
while (oSOrderDet.GetDBStatus () == 0 && oSOrderDet.pArtNumStock.ToString () == strArtNumStock)
{
    // Process record data
    
    oSOrderDet.GetNext ();
}

VBS
 
' Seek the data of all detail lines for the article with stock number = 'Stock' of all sales orders
Dim strArtNumStock
Dim dtDocDate
strArtNumStock = "Stock"
Call oSOrderDet.SeekByStcArtNum(smGreaterOrEqual, strArtNumStock, dtDocDate)
While oSOrderDet.GetDBStatus() = 0 And oSOrderDet.pArtNumStock = strArtNumStock
    ' Process record data

    Call oSOrderDet.GetNext()
Wend

VB.NET
 
' Seek the data of all detail lines for the article with stock number = 'Stock' of all sales orders
Dim strArtNumStock As String
Dim dtDocDate As Date
strArtNumStock = "Stock"
oSOrderDet.SeekByStcArtNum(eSeekMode.smGreaterOrEqual, strArtNumStock, dtDocDate)
While oSOrderDet.GetDBStatus() = 0 And oSOrderDet.pArtNumStock = strArtNumStock
    ' Process record data

    oSOrderDet.GetNext()
End While