AnaProp::UpdateDetailSel (Interface: AnaProp)
 
Updates an accounting detail in the proposal (with selectively given values).
 
void UpdateDetailSel (
    SHORT sIndex,
    VARIANT vPercentage,
    VARIANT vValue1,
    VARIANT vAnaAccount,
    VARIANT vAnaKind,
    VARIANT vRemark,
    VARIANT vText1
)
 
Parameters
sIndex
[in] The index of the detail, starting from 0.
vPercentage
[in] A VARIANT stating the updated percentage of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype DOUBLE (VT_R8) is supplied, the given value is used.
vValue1
[in] A VARIANT stating the updated free value of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype DOUBLE (VT_R8) is supplied, the given value is used.
vAnaAccount
[in] A VARIANT stating the updated analytical account of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype BSTR (VT_BSTR) is supplied, the given value is used.
vAnaKind
[in] A VARIANT stating the updated analytical kind of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype BSTR (VT_BSTR) is supplied, the given value is used.
vRemark
[in] A VARIANT stating the updated remark of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype BSTR (VT_BSTR) is supplied, the given value is used.
vText1
[in] A VARIANT stating the updated free text of the detail.
If a VARIANT of subtype VT_EMPTY is supplied, the existing value (on disk) is kept.
If a VARIANT of subtype BSTR (VT_BSTR) is supplied, the given value is used.
 
Remarks
If the parameter sIndex is an invalid index (refers to a not existing detail) an exception is thrown. You can use GetDetail to check whether an index is valid, in which case it returns true.
How to pass a VARIANT of type VT_EMPTY?
C++
Define a VARIANT and set the type to VT_EMPTY (vEmpty.vt = VT_EMPTY).
Pass this VARIANT.
C#
Pass 'null'.
VBS
Pass 'Empty'.
VB.NET
Pass 'Nothing'.
 
See Also
CreateAnaProp
Handling analytical accounting proposals using the SDK
PrepareProposal
WriteProposal
CancelProposal
 
Samples
 
C++
 
// Update the remark of the first detail of the current proposal to 'Updated via SDK', leaving all other data unchanged
VARIANT vEmpty;
vEmpty.vt = VT_EMPTY;

pAnaProp->PrepareProposal (paUpdate);

pAnaProp->UpdateDetailSel (0, vEmpty, vEmpty, vEmpty, vEmpty, "Updated via SDK", vEmpty);

pAnaProp->WriteProposal (rmFullReport);

C#
 
// Update the remark of the first detail of the current proposal to 'Updated via SDK', leaving all other data unchanged
oAnaProp.PrepareProposal (ePrepareAction.paUpdate);

oAnaProp.UpdateDetailSel (0, null, null, null, null, "Updated via SDK", null);

oAnaProp.WriteProposal (eReportMode.rmFullReport);

VBS
 
' Update the remark of the first detail of the current proposal to 'Updated via SDK', leaving all other data unchanged
Call oAnaProp.PrepareProposal(paUpdate)

Call oAnaProp.UpdateDetailSel(0, Empty, Empty, Empty, Empty, "Updated via SDK", Empty)

Call oAnaProp.WriteProposal(rmFullReport)

VB.NET
 
' Update the remark of the first detail of the current proposal to 'Updated via SDK', leaving all other data unchanged
oAnaProp.PrepareProposal(ePrepareAction.paUpdate)

oAnaProp.UpdateDetailSel(0, Nothing, Nothing, Nothing, Nothing, "Updated via SDK", Nothing)

oAnaProp.WriteProposal(eReportMode.rmFullReport)