SDelivDet::Browse (Interface: SDelivDet)
 
Browses the file for a Sales Delivery Detail line.
 
LONG Browse (
    VARIANT_BOOL bFromCurrPos
)
 
Parameters
bFromCurrPos
[in] When this parameter is set to true the browse will use the current position of the file and the key that was set by the previous SeekBy-method. If the parameter is false the browse will be positioned at the beginning of the file and the key will be the last one that was manually selected in the browse.
 
Return value
A LONG containing the system number of the selected record, 0 if no record was selected.
 
Remarks
This method can only be used if user interface is allowed (parameter bWithUserInterface is set to true in the Logon method), because a record can only be selected using the browse dialog.
 
See Also
CreateSDelivDet
SeekByDocument
 
Samples
 
C++
 
CString strBook = "FAC";
long lDocNum = 12, lSysNum;
if (pSDelivDet->SeekByDocument (smGreaterOrEqual, (LPCSTR)strBook, lDocNum, 0) &&
    (CString)pSDelivDet->pBook == strBook && (long)pSDelivDet->pDocNum == lDocNum)
    // Browse using the key 'SDD_LNE' (document) and positioned on the record found by SeekByDocument
    lSysNum = pSDelivDet->Browse (VARIANT_TRUE);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = pSDelivDet->Browse (VARIANT_FALSE);

C#
 
string strBook = "FAC";
int iDocNum = 12, iSysNum;
if (oSDelivDet.SeekByDocument (eSeekMode.smGreaterOrEqual, strBook, iDocNum, 0) &&
    oSDelivDet.pBook.ToString () == strBook && (int)oSDelivDet.pDocNum == iDocNum)
    // Browse using the key 'SDD_LNE' (document) and positioned on the record found by SeekByDocument
    iSysNum = oSDelivDet.Browse (true);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    iSysNum = oSDelivDet.Browse (false);

VBS
 
Dim strBook
Dim lDocNum, lSysNum
strBook = "FAC"
lDocNum = 12
If oSDelivDet.SeekByDocument(smGreaterOrEqual, strBook, lDocNum, 0) And oSDelivDet.pBook = strBook And oSDelivDet.pDocNum = lDocNum Then
    ' Browse using the key 'SDD_LNE' (document) and positioned on the record found by SeekByDocument
    lSysNum = oSDelivDet.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oSDelivDet.Browse(False)
End If

VB.NET
 
Dim strBook As String
Dim lDocNum, lSysNum As Long
strBook = "FAC"
lDocNum = 12
If oSDelivDet.SeekByDocument(eSeekMode.smGreaterOrEqual, strBook, lDocNum, 0) And oSDelivDet.pBook = strBook And oSDelivDet.pDocNum = lDocNum Then
    ' Browse using the key 'SDD_LNE' (document) and positioned on the record found by SeekByDocument
    lSysNum = oSDelivDet.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oSDelivDet.Browse(False)
End If