SInvce::SeekByDocGroup (Interface: SInvce)
 
Seeks a Sales Invoice by its document group.
 
VARIANT_BOOL SeekByDocGroup (
    enum eSeekMode eSeekMode,
    SHORT sTransferGroup,
    BSTR bsBook,
    LONG lDocNum
)
 
Key information
This method uses key number 7 (See SwapKey).
This is a unique key.
This is a null key, only the records where pTransferGroup is not 0 are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pTransferGroupSHORT (unsigned)Ascending-
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
sTransferGroup
[in] The transfer group of the Sales Invoice you want to seek.
bsBook
[in] The book code of the Sales Invoice you want to seek.
lDocNum
[in] The document number of the Sales Invoice you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSInvce
GetDBStatus
GetNext
 
Samples
 
C++
 
// Process all documents belonging to document group 5
USHORT usSeekTrnGroup = 5;
pSInvce->SeekByDocGroup (smGreaterOrEqual, usSeekTrnGroup, "", 0);
while (pSInvce->GetDBStatus () == 0 && (USHORT)pSInvce->pTransferGroup.uiVal == usSeekTrnGroup)
{
    // Process record data

    pSInvce->GetNext ();
}

// Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
if (pSInvce->SeekByDocGroup (smEqual, usSeekTrnGroup, "Book", 12))
    // Document belongs to document group 5

C#
 
// Process all documents belonging to document group 5
short sSeekTrnGroup = 5;
oSInvce.SeekByDocGroup (eSeekMode.smGreaterOrEqual, sSeekTrnGroup, "", 0);
while (oSInvce.GetDBStatus () == 0 && (short)oSInvce.pTransferGroup == sSeekTrnGroup)
{
    // Process record data

    oSInvce.GetNext ();
}

// Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
if (oSInvce.SeekByDocGroup (eSeekMode.smEqual, sSeekTrnGroup, "Book", 12))
    // Document belongs to document group 5

VBS
 
' Process all documents belonging to document group 5
Dim sSeekTrnGroup
sSeekTrnGroup = 5
Call oSInvce.SeekByDocGroup(smGreaterOrEqual, sSeekTrnGroup, "", 0)
While oSInvce.GetDBStatus() = 0 And oSInvce.pTransferGroup = sSeekTrnGroup
    ' Process record data

    Call oSInvce.GetNext()
Wend

' Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
If oSInvce.SeekByDocGroup (smEqual, sSeekTrnGroup, "Book", 12) Then
    ' Document belongs to document group 5
End If

VB.NET
 
' Process all documents belonging to document group 5
Dim sSeekTrnGroup As Short
sSeekTrnGroup = 5
oSInvce.SeekByDocGroup(eSeekMode.smGreaterOrEqual, sSeekTrnGroup, "", 0)
While oSInvce.GetDBStatus() = 0 And oSInvce.pTransferGroup = sSeekTrnGroup
    ' Process record data

    oSInvce.GetNext()
End While

' Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
If oSInvce.SeekByDocGroup (eSeekMode.smEqual, sSeekTrnGroup, "Book", 12) Then
    ' Document belongs to document group 5
End If