Venice
Dossier::GetPrefixes
 
Gets an array of prefixes in the current dossier.
 
VARIANT GetPrefixes ()
 
Return value
A VARIANT, subtype SafeArray of VARIANTs, subtype BSTRING containing a list of all prefixes in the current dossier.
 
Remarks
The prefixes are returned in the same order as the values in the enum eAccPrefix, i.e. customer, supplier, deposit, bank, postal cheque and cash.
Attention! You cannot use the enum value as an index in the array! The enum starts with apGeneral which has no prefix, so use the enum values - 1 as an index in this array.
 
See Also
CreateDossierContext
 
Samples
 
C++
 
// Get all prefixes of the current dossier
COleVariant vPrefixes = pDossier->GetPrefixes ();    
if (vPrefixes.vt & VT_ARRAY)                // Check if the array is empty
{
    COleSafeArray saPrefixes (vPrefixes);    // Construct a Safe Array from the VARIANT
    VARIANT vPrefix;
    long lUB, lInd;

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

C#
 
// Get all prefixes of the current dossier
Array aPrefixes = (Array)oDossier.GetPrefixes ();

if (aPrefixes != null)
{
    foreach (Object oPrefix in aPrefixes)
    {
        // Process oPrefix
    }
}

VBS
 
Dim vPrefixes, vPrefix

' Get all prefixes of the current dossier
vPrefixes = oDossier.GetPrefixes()
If Not IsEmpty(vPrefixes) Then
    For Each vPrefix In vPrefixes
        ' Process vPrefix
    Next
End If

VB.NET
 
Dim oPrefixes, oPrefix As Object

' Get all prefixes of the current dossier
oPrefixes = oDossier.GetPrefixes()
If Not IsNothing(oPrefixes) Then
    For Each oPrefix In oPrefixes
        ' Process oPrefix
    Next
End If