Venice
PInvce::SeekByDocGroup
 
Seeks a Purchase 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 Purchase Invoice you want to seek.
bsBook
[in] The book code of the Purchase Invoice you want to seek.
lDocNum
[in] The document number of the Purchase Invoice you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePInvce
GetDBStatus
GetNext
 
Samples
 
C++
 
// Process all documents belonging to document group 5
USHORT usSeekTrnGroup = 5;
pPInvce->SeekByDocGroup (smGreaterOrEqual, usSeekTrnGroup, "", 0);
while (pPInvce->GetDBStatus () == 0 && (USHORT)pPInvce->pTransferGroup.uiVal == usSeekTrnGroup)
{
    // Process record data

    pPInvce->GetNext ();
}

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

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

    oPInvce.GetNext ();
}

// Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
if (oPInvce.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 oPInvce.SeekByDocGroup(smGreaterOrEqual, sSeekTrnGroup, "", 0)
While oPInvce.GetDBStatus() = 0 And oPInvce.pTransferGroup = sSeekTrnGroup
    ' Process record data

    Call oPInvce.GetNext()
Wend

' Check if document with book code = 'Book' and document number 12 belongs to transfer group 5
If oPInvce.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
oPInvce.SeekByDocGroup(eSeekMode.smGreaterOrEqual, sSeekTrnGroup, "", 0)
While oPInvce.GetDBStatus() = 0 And oPInvce.pTransferGroup = sSeekTrnGroup
    ' Process record data

    oPInvce.GetNext()
End While

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