ComAs::SeekByCustm (Interface: ComAs)
 
Seeks a Commercial Sales Agreement by its customer info.
 
VARIANT_BOOL SeekByCustm (
    enum eSeekMode eSeekMode,
    enum eComAgType eComAgType,
    VARIANT_BOOL bPriority,
    enum eCstKind eCstKind,
    LONG lCstNum,
    BSTR bsCstCat,
    enum eArtKind eArtKind,
    BSTR bsArtNum,
    BSTR bsArtCat,
    DOUBLE dQuantity
)
 
Key information
This method uses key number 1 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pComAgTypeBYTEAscending-
pPriorityVARIANT_BOOLDescending-
pCstKindBYTEAscending-
pCstNumLONG (unsigned)Ascending-
pCstCatBSTRAscendingCase insensitive
pArtKindBYTEAscending-
pArtNumBSTRAscendingHierarchy
pArtCatBSTRAscendingCase insensitive
pQuantityDOUBLEAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
eComAgType
[in] A value of the 'eComAgType' enumeration.
bPriority
[in] Does the commercial sales agreement you want to seek have priority?
 
Remarks
Commercial sales agreements that have no priority are unique records. In this case you can use the value smEqual for the parameter eSeekMode.
Priority records can occur more than once for the same data, but for different periods. In this case it is not safe to use the value smEqual for the parameter eSeekMode.
eCstKind
[in] A value of the 'eCstKind' enumeration.
lCstNum
[in] The customer number of the commercial sales agreement you want to seek.
bsCstCat
[in] The customer category of the commercial sales agreement you want to seek.
eArtKind
[in] A value of the 'eArtKind' enumeration.
bsArtNum
[in] The article number of the commercial sales agreement you want to seek.
bsArtCat
[in] The article category of the commercial sales agreement you want to seek.
dQuantity
[in] The quantity for which you want to seek a commercial sales agreement.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateComAs
 
Samples
 
C++
 
// Find the non-prior commercial sales agreement of type discount for customer with number 25 when buying 100 pieces of the article with number 'ART_001'.
if (pComAs->SeekByCustm (smEqual, caDiscount, VARIANT_FALSE, ckNum, 25, "", akNum, "ART_001", "", 100.0))
    // Process record data

C#
 
// Find the non-prior commercial sales agreement of type discount for customer with number 25 when buying 100 pieces of the article with number 'ART_001'.
if (oComAs.SeekByCustm (eSeekMode.smEqual, eComAgType.caDiscount, false, eCstKind.ckNum, 25, "", eArtKind.akNum, "ART_001", "", 100.0))
    // Process record data

VBS
 
' Find the non-prior commercial sales agreement of type discount for customer with number 25 when buying 100 pieces of the article with number 'ART_001'.
If oComAs.SeekByCustm(smEqual, caDiscount, False, ckNum, 25, "", akNum, "ART_001", "", 100.0) Then
    ' Process record data
End If

VB.NET
 
' Find the non-prior commercial sales agreement of type discount for customer with number 25 when buying 100 pieces of the article with number 'ART_001'.
If oComAs.SeekByCustm(eSeekMode.smEqual, eComAgType.caDiscount, False, eCstKind.ckNum, 25, "", eArtKind.akNum, "ART_001", "", 100.0) Then
    ' Process record data
End If