Venice
AccProp::UpdateDetailSel
 
Updates an accounting detail in the proposal (with selectively given values).
 
void UpdateDetailSel (
    SHORT sIndex,
    VARIANT vAmountDocC,
    VARIANT vQuantity,
    VARIANT vValue1,
    VARIANT vAccount,
    VARIANT vRemark,
    VARIANT vText1
)
 
Parameters
sIndex
[in] The index of the detail, starting from 0.
vAmountDocC
[in] A VARIANT stating the updated monetary amount (in proposal currency) 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.
vQuantity
[in] A VARIANT stating the updated quantity 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.
vAccount
[in] A VARIANT stating the updated account number 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
CreateAccProp
Handling 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;

pAccProp->PrepareProposal (paUpdate);

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

pAccProp->WriteProposal (rmFullReport);

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

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

oAccProp.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 oAccProp.PrepareProposal(paUpdate)

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

Call oAccProp.WriteProposal(rmFullReport)

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

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

oAccProp.WriteProposal(eReportMode.rmFullReport)