ProjectDet::SeekByDocLink (Interface: ProjectDet)
 
Seeks a Project Detail by its document link.
 
VARIANT_BOOL SeekByDocLink (
    enum eSeekMode eSeekMode,
    enum eInvDocType eInvDocType,
    BSTR bsDocBook,
    SHORT sDocAccYear,
    LONG lDocNum
)
 
Key information
This method uses key number 5 (See SwapKey).
This key allows duplicates.
This is a null key, only the records where pDocType is not 0 are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pDocTypeBYTEAscending-
pDocBookBSTRAscendingCase insensitive
pDocAccYearSHORT (unsigned)Ascending-
pDocNumLONG (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
eInvDocType
[in] A value of the 'eInvDocType' enumeration.
bsDocBook
[in] The book of the document linked to the project detail you want to seek.
sDocAccYear
[in] The financial year of the document linked to the project detail you want to seek.
lDocNum
[in] The number of the document linked to the project detail you want to seek.
 
See Also
CreateProjectDet
 
Samples
 
C++
 
// Seek all project details linked to the sales offer from book 'FAC', with number 125 in financial year 2024
CString strBook = "FAC";
long lDocNum = 125;
USHORT usAccYear = 2024;
eInvDocType eIDT = idtIso;
pProjectDet->SeekByDocLink (smGreaterOrEqual, eIDT, (LPCSTR)strBook, usAccYear, lDocNum);
while (pProjectDet->GetDBStatus () == 0 && pProjectDet->pDocType.bVal == eIDT && (CString)pProjectDet->pDocBook == strBook && (USHORT)pProjectDet->pDocAccYear == usAccYear && (long)pProjectDet->pDocNum == lDocNum)
{
    // Process record data
    
    pProjectDet->GetNext ();
}

C#
 
// Seek all project details linked to the sales offer from book 'FAC', with number 125 in financial year 2024
string strBook = "FAC";
int iDocNum = 125;
short sAccYear = 2024;
eInvDocType eIDT = eInvDocType.idtIso;
oProjectDet.SeekByDocLink (eSeekMode.smGreaterOrEqual, eIDT, strBook, sAccYear, iDocNum);
while (oProjectDet.GetDBStatus () == 0 && (eInvDocType)Enum.ToObject(typeof(eInvDocType), oProjectDet.pDocType) == eIDT && oProjectDet.pDocBook.ToString () == strBook && (short)oProjectDet.pDocAccYear == sAccYear && (int)oProjectDet.pDocNum == iDocNum)
{
    // Process record data
    
    oProjectDet.GetNext ();
}

VBS
 
' Seek all project details linked to the sales offer from book 'FAC', with number 125 in financial year 2024
Dim strBook
Dim dwDocNum
Dim sAccYear
Dim eIDT
strBook = "FAC"
sAccYear = 2024
dwDocNum = 125
eIDT = idtIso
Call oProjectDet.SeekByDocLink(smGreaterOrEqual, eIDT, strBook, sAccYear, dwDocNum)
While oProjectDet.GetDBStatus() = 0 And oProjectDet.pDocType = eIDT And oProjectDet.pDocBook = strBook And oProjectDet.pDocAccYear = sAccYear And oProjectDet.pDocNum = dwDocNum
    ' Process record data

    Call oProjectDet.GetNext()
Wend

VB.NET
 
' Seek all project details linked to the sales offer from book 'FAC', with number 125 in financial year 2024
Dim strBook As String
Dim ulDocNum As ULong
Dim sAccYear As Short
Dim eIDT As eInvDocType
strBook = "FAC"
ulDocNum = 125
sAccYear = 2024
eIDT = eInvDocType.idtIso

oProjectDet.SeekByDocLink(eSeekMode.smGreaterOrEqual, eIDT, strBook, sAccYear, ulDocNum)
While oProjectDet.GetDBStatus() = 0 And oProjectDet.pDocType = eIDT And oProjectDet.pDocBook = strBook And oProjectDet.pDocAccYear = sAccYear And oProjectDet.pDocNum = ulDocNum
    ' Process record data

    oProjectDet.GetNext()
End While