Venice
SOrderDet::SeekByOpenArt
 
Seeks an open Sales Order Detail line by its article number.
 
VARIANT_BOOL SeekByOpenArt (
    enum eSeekMode eSeekMode,
    BSTR bsArtNum,
    BSTR bsBook,
    LONG lDocNum,
    SHORT sLineNum
)
 
Key information
This method uses key number 6 (See SwapKey).
This is a unique key.
This is a null key, only the records where pIsOpen is true are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pArtNumBSTRAscendingHierarchy
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
pLineNumSHORT (unsigned)Ascending-
pIsOpenVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsArtNum
[in] The article number of the Sales Order Detail line you want to seek.
bsBook
[in] The book code of the Sales Order of which you want to seek a detail line.
lDocNum
[in] The document number of the Sales Order of which you want to seek a detail line.
sLineNum
[in] The line number of the Sales Order 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
CreateSOrderDet
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek the data of all open detail lines for the article with number = 'Art_001' of all sales orders
CString strArtNum = "Art_001";
pSOrderDet->SeekByOpenArt (smGreaterOrEqual, (LPCSTR)strArtNum, "", 0, 0);
while (pSOrderDet->GetDBStatus () == 0 && (CString)pSOrderDet->pArtNum == strArtNum)
{
    // Process record data
    
    pSOrderDet->GetNext ();
}

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

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

    Call oSOrderDet.GetNext()
Wend

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

    oSOrderDet.GetNext()
End While