Venice
PInvce::SeekByTrnBook
 
Seeks a Purchase Invoice by its transfer state and book.
 
VARIANT_BOOL SeekByTrnBook (
    enum eSeekMode eSeekMode,
    BSTR bsBook,
    LONG lDocNum
)
 
Key information
This method uses key number 5 (See SwapKey).
This is a unique key.
This is a null key, only the records where pToTransfer is true are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
pToTransferVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
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 that still need to be transferred
pPInvce->SeekByTrnBook (smFirst, "", 0);
while (pPInvce->GetDBStatus () == 0)
{
    // Process record data

    pPInvce->GetNext ();
}

// Check if the document with book code = 'Book' and document number = 12 still needs to be transferred
if (pPInvce->SeekByTrnBook (smEqual, "Book", 12))
    // Record still needs to be transferred

C#
 
// Process all documents that still need to be transferred
oPInvce.SeekByTrnBook (eSeekMode.smFirst, "", 0);
while (oPInvce.GetDBStatus () == 0)
{
    // Process record data

    oPInvce.GetNext ();
}

// Check if the document with book code = 'Book' and document number = 12 still needs to be transferred
if (oPInvce.SeekByTrnBook (eSeekMode.smEqual, "Book", 12))
    // Record still needs to be transferred

VBS
 
' Process all documents that still need to be transferred
Call oPInvce.SeekByTrnBook(smFirst, "", 0)
While oPInvce.GetDBStatus() = 0
    ' Process record data

    Call oPInvce.GetNext()
Wend

' Check if the document with book code = 'Book' and document number = 12 still needs to be transferred
If oPInvce.SeekByTrnBook(smEqual, "Book", 12) Then
    ' Record still needs to be transferred
End If

VB.NET
 
' Process all documents that still need to be transferred
oPInvce.SeekByTrnBook(eSeekMode.smFirst, "", 0)
While oPInvce.GetDBStatus() = 0
    ' Process record data

    oPInvce.GetNext()
End While

' Check if the document with book code = 'Book' and document number = 12 still needs to be transferred
If oPInvce.SeekByTrnBook(eSeekMode.smEqual, "Book", 12) Then
    ' Record still needs to be transferred
End If