Venice
Product::Browse
 
Browses the file for a Production Document.
 
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
CreateProduct
SeekByArtNum
 
Samples
 
C++
 
long lSysNum;
if (pProduct->SeekByArtNum (smEqual, "Art_001", COleDateTime (2024, 4, 17, 0, 0, 0).m_dt))
    // Browse using the key 'CPH_ART' (article number) and positioned on the record found by SeekByArtNum
    lSysNum = pProduct->Browse (VARIANT_TRUE);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = pProduct->Browse (VARIANT_FALSE);

C#
 
int iSysNum;
if (oProduct.SeekByArtNum (eSeekMode.smEqual, "Art_001", new DateTime (2024, 4, 17)))
    // Browse using the key 'CPH_ART' (article number) and positioned on the record found by SeekByArtNum
    iSysNum = oProduct.Browse (true);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    iSysNum = oProduct.Browse (false);

VBS
 
Dim lSysNum
If oProduct.SeekByArtNum(smEqual, "Art_001", #4/17/2024#) Then
    ' Browse using the key 'CPH_ART' (article number) and positioned on the record found by SeekByArtNum
    lSysNum = oProduct.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oProduct.Browse(False)
End If

VB.NET
 
Dim lSysNum As Long
If oProduct.SeekByArtNum(eSeekMode.smEqual, "Art_001", #4/17/2024#) Then
    ' Browse using the key 'CPH_ART' (article number) and positioned on the record found by SeekByArtNum
    lSysNum = oProduct.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oProduct.Browse(False)
End If