Purch::SeekByClassCode (Interface: Purch)
 
Seeks a Purchase Document by its classification code.
 
VARIANT_BOOL SeekByClassCode (
    enum eSeekMode eSeekMode,
    BSTR bsClassCode
)
 
Key information
This method uses key number 6 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pClassBSTRAscendingCase insensitive
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsClassCode
[in] The classification code of the Purchase Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePurch
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all Purchase Documents with classification code = 'CLASS'
pPurch->SeekByClassCode (smEqual, "CLASS");
while (pPurch->GetDBStatus () == 0 && (CString)pPurch->pClass == "CLASS")
{
    // Process record data

    pPurch->GetNext ();
}

C#
 
// Seek all Purchase Documents with classification code = 'CLASS'
oPurch.SeekByClassCode (eSeekMode.smEqual, "CLASS");
while (oPurch.GetDBStatus () == 0 && oPurch.pClass.ToString() == "CLASS")
{
    // Process record data
    
    oPurch.GetNext ();
}

VBS
 
' Seek all Purchase Documents with classification code = 'CLASS'
Call oPurch.SeekByClassCode(smEqual, "CLASS")
While oPurch.GetDBStatus() = 0 And oPurch.pClass = "CLASS"
    ' Process record data

    Call oPurch.GetNext()
Wend

VB.NET
 
' Seek all Purchase Documents with classification code = 'CLASS'
oPurch.SeekByClassCode(eSeekMode.smEqual, "CLASS")
While oPurch.GetDBStatus() = 0 And oPurch.pClass = "CLASS"
    ' Process record data

    oPurch.GetNext()
End While