Venice
SDelivDet::SeekByArticle
 
Seeks a Sales Delivery Detail line by its article number.
 
VARIANT_BOOL SeekByArticle (
    enum eSeekMode eSeekMode,
    BSTR bsArtNum,
    BSTR bsBook,
    LONG lDocNum,
    SHORT sLineNum
)
 
Key information
This method uses key number 7 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pArtNumBSTRAscendingHierarchy
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
pLineNumSHORT (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsArtNum
[in] The article number of the Sales Delivery Detail line you want to seek.
bsBook
[in] The book code of the Sales Delivery of which you want to seek a detail line.
lDocNum
[in] The document number of the Sales Delivery of which you want to seek a detail line.
sLineNum
[in] The line number of the Sales Delivery Detail line you want to seek.
 
Remarks
This number is a 0-based index, i.e. it starts from 0. Therefore the value of this parameter is 1 less than the numbers shown in the Venice grids and 1 less than the value returned by the property vLine (see properties)!
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSDelivDet
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek the data of all detail lines for the article with number = 'Art_001' of all sales deliveries
CString strArtNum = "Art_001";
pSDelivDet->SeekByArticle (smGreaterOrEqual, (LPCSTR)strArtNum, "", 0, 0);
while (pSDelivDet->GetDBStatus () == 0 && (CString)pSDelivDet->pArtNum == strArtNum)
{
    // Process record data
    
    pSDelivDet->GetNext ();
}

C#
 
// Seek the data of all detail lines for the article with number = 'Art_001' of all sales deliveries
string strArtNum = "Art_001";
oSDelivDet.SeekByArticle (eSeekMode.smGreaterOrEqual, strArtNum, "", 0, 0);
while (oSDelivDet.GetDBStatus () == 0 && oSDelivDet.pArtNum.ToString () == strArtNum)
{
    // Process record data
    
    oSDelivDet.GetNext ();
}

VBS
 
' Seek the data of all detail lines for the article with number = 'Art_001' of all sales deliveries
Dim strArtNum
strArtNum = "Art_001"
Call oSDelivDet.SeekByArticle(smGreaterOrEqual, strArtNum, "", 0, 0)
While oSDelivDet.GetDBStatus() = 0 And oSDelivDet.pArtNum = strArtNum
    ' Process record data

    Call oSDelivDet.GetNext()
Wend

VB.NET
 
' Seek the data of all detail lines for the article with number = 'Art_001' of all sales deliveries
Dim strArtNum As String
strArtNum = "Art_001"
oSDelivDet.SeekByArticle(eSeekMode.smGreaterOrEqual, strArtNum, "", 0, 0)
While oSDelivDet.GetDBStatus() = 0 And oSDelivDet.pArtNum = strArtNum
    ' Process record data

    oSDelivDet.GetNext()
End While