Venice
Dossier::GetYears
 
Gets an array of the financial years for the current dossier.
 
VARIANT GetYears ()
 
Return value
A VARIANT, subtype SafeArray of VARIANTs, subtype SHORT containing a list of all years of the dossier object.
 
Remarks
A user must be logged on the Venice object first.
This method does not return the list of all existing filing cabinets, only the ones connected for the current Windows User on the current computer (HKEY_CURRENT_USER).
 
See Also
CreateDossierContext
GetCabinets
GetDossiers
 
Samples
 
C++
 
// Get all financial years of the dossier object
COleVariant vYears = pDossier->GetYears ();    
if (vYears.vt & VT_ARRAY)                // Check if the array is empty
{
    COleSafeArray saYears (vYears);        // Construct a Safe Array from the VARIANT
    VARIANT vYear;
    long lUB, lInd;

    saYears.GetUBound (1, &lUB);        // Get the upper bound of the array
    for (lInd = 0; lInd <= lUB; lInd++)
    {
        saYears.GetElement (&lInd, &vYear);
        // Process vYear
    }
}

C#
 
// Get all financial years of the dossier object
Array aYears = (Array)oDossier.GetYears ();

if (aYears != null)
{
    foreach (Object oYear in aYears)
    {
        // Process oYear
    }
}

VBS
 
Dim vYears, vYear

' Get all financial years of the dossier object
vYears = oDossier.GetYears()
If Not IsEmpty(vYears) Then
    For Each vYear In vYears
        ' Process vYear
    Next
End If

VB.NET
 
Dim oYears, oYear As Object

' Get all financial years of the dossier object
oYears = oDossier.GetYears()
If Not IsNothing(oYears) Then
    For Each oYear In oYears
        ' Process oYear
    Next
End If