|
Seeks a Material Assets card by its sales document. |
|
 |
VARIANT_BOOL SeekBySlsDoc ( enum eSeekMode eSeekMode, SHORT sAccYear, BSTR bsBook, LONG lDocNum ) |
|
|
Key information |  | This method uses key number 6 (See SwapKey). |  | This key allows duplicates. |  | This is a null key, only the records where pAslAccYear is not 0 and pAslDocNum is not 0 are in the index. |
| | Key segment information | | | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | sAccYear | [in] The financial year of the sales document you want to seek the material assets card by. | bsBook | [in] The book code of the sales document you want to seek the material assets card by. | lDocNum | [in] The document number of the sales document you want to seek the material assets card by. | | Return value |
True if the record with the given properties was found, otherwise false. |
|
See Also |
|
|
|
Samples |
|
 |
C++ |
|
// Seek all the material assets cards that have a reference to the sales document '2025 SLS 000.112'
CString strBook = "SLS";
DWORD dwDocNum = 112;
USHORT usAccYear = 2025;
pMaCrd->SeekBySlsDoc (smEqual, usAccYear, (LPCSTR)strBook, dwDocNum);
while ( pMaCrd->GetDBStatus () == 0 &&
(USHORT)pMaCrd->pAslAccYear == usAccYear &&
(CString)pMaCrd->pAslBook == strBook &&
(DWORD)pMaCrd->pAslDocNum == dwDocNum)
{
// Process record data
pMaCrd->GetNext ();
}
|
|
 |
C# |
|
// Seek all the material assets cards that have a reference to the sales document '2025 SLS 000.112'
string strBook = "SLS";
int iDocNum = 112;
short sAccYear = 2025;
oMaCrd.SeekBySlsDoc (eSeekMode.smEqual, sAccYear, strBook, iDocNum);
while ( oMaCrd.GetDBStatus () == 0 &&
(short)oMaCrd.pAslAccYear == sAccYear &&
oMaCrd.pAslBook.ToString () == strBook &&
(int)oMaCrd.pAslDocNum == iDocNum)
{
// Process record data
oMaCrd.GetNext ();
}
|
|
 |
VBS |
|
' Seek all the material assets cards that have a reference to the sales document '2025 SLS 000.112'
Dim strBook
Dim lDocNum
Dim sAccYear
strBook = "SLS"
lDocNum = 112
sAccYear = 2025
Call oMaCrd.SeekBySlsDoc(smEqual, sAccYear, strBook, lDocNum)
While oMaCrd.GetDBStatus() = 0 And oMaCrd.pAslAccYear = sAccYear And oMaCrd.pAslBook = strBook And oMaCrd.pAslDocNum = lDocNum
' Process record data
Call oMaCrd.GetNext()
Wend
|
|
 |
VB.NET |
|
' Seek all the material assets cards that have a reference to the sales document '2025 SLS 000.112'
Dim strBook As String
Dim lDocNum As Long
Dim sAccYear As Short
strBook = "SLS"
lDocNum = 112
sAccYear = 2025
oMaCrd.SeekBySlsDoc(eSeekMode.smEqual, sAccYear, strBook, lDocNum)
While oMaCrd.GetDBStatus() = 0 And oMaCrd.pAslAccYear = sAccYear And oMaCrd.pAslBook = strBook And oMaCrd.pAslDocNum = lDocNum
' Process record data
oMaCrd.GetNext()
End While
|
|