Venice
Project::UpdateDetailSel
 
Updates a project detail (with selectively given values).
 
void UpdateDetailSel (
    SHORT sIndex,
    VARIANT vValue1,
    VARIANT vFrmNum,
    VARIANT vFrmSubNum,
    VARIANT vCtcNum,
    VARIANT vUsedTime,
    VARIANT vDocNum,
    VARIANT vActionDateTime,
    VARIANT vDocAccYear,
    VARIANT vDocBook,
    VARIANT vLanguage,
    VARIANT vComment,
    VARIANT vText1,
    VARIANT vFrmType,
    VARIANT vChannel,
    VARIANT vDocType,
    VARIANT vDocVariant,
    VARIANT vToInvoice
)
 
Parameters
sIndex
[in] The index of the project detail.

Remarks
This number is a 0-based index, i.e. it starts from 0.
Each project detail has a sequence number that is shown in the dialog of your Venice installation. This number can be used to reference a project detail but does not have to be equal to the index that has to be used here. When deleting project details sequence numbers are not renumbered and therefore gaps can occur. The SDK internally uses indexes where no gaps are allowed. The method IndexFromSeqNum returns the index to be used for a given sequence number.
vValue1
[in] A VARIANT stating the free numerical value of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DOUBLE (VT_R8) Use the given value

vFrmNum
[in] A VARIANT stating the firm number of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DWORD (unsigned long) (VT_UI4) Use the given value

vFrmSubNum
[in] A VARIANT stating the firm subnumber of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DWORD (unsigned long) (VT_UI4) Use the given value

vCtcNum
[in] A VARIANT stating the contact number of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DWORD (unsigned long) (VT_UI4) Use the given value

vUsedTime
[in] A VARIANT stating the used time (expressed in seconds) of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DWORD (unsigned long) (VT_UI4) Use the given value

vDocNum
[in] A VARIANT stating the document number of the document referenced in the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DWORD (unsigned long) (VT_UI4) Use the given value

vActionDateTime
[in] A VARIANT stating the action date and time of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
DATE (VT_DATE) Use the given value

vDocAccYear
[in] A VARIANT stating the accounting year of the document referenced in the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
WORD (unsigned short) (VT_UI2) Use the given value

vDocBook
[in] A VARIANT stating the document book of the document referenced in the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value

vLanguage
[in] A VARIANT stating the language of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value

vComment
[in] A VARIANT stating the contents of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value

vText1
[in] A VARIANT stating the free text value of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BSTR (VT_BSTR) Use the given value

vFrmType
[in] A VARIANT stating the type of firm (see eFirmType for possible values) of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BYTE (unsigned char) (VT_UI1) Use the given value

vChannel
[in] A VARIANT stating the channel (see eChannel for possible values) of the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BYTE (unsigned char) (VT_UI1) Use the given value

vDocType
[in] A VARIANT stating the document type (see eInvDocType for possible values) of the document referenced in the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BYTE (unsigned char) (VT_UI1) Use the given value

Remarks
The enum values 'idtStc', 'idtTrn' and 'idtCmp' cannot be used, otherwise an exception will be thrown!

vDocVariant
[in] A VARIANT stating the document print variant of the document referenced in the project detail. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BYTE (unsigned char) (VT_UI1) Use the given value

Remarks
The following values are available, providing the corresponding variant exists for the given document:
0 Refers to an invalid, not existing variant (can be used as initialisation).
32-41 Refers to the user variants '0' to '9' on dossier level.
48-57 Refers to the user variants '0' to '9' on main level.
65-90 Refers to the Exact Venice variants 'A' to 'Z'.

vToInvoice
[in] A VARIANT stating whether this project detail has to be invoiced or not. The type of this VARIANT determines the action to be taken by the SDK:
Subtype Action
VT_EMPTY Keep the existing value (on disk)
BOOLEAN (VT_BOOL) Use the given value
 
Remarks
If no project detail is found with the given parameter sIndex an exception is thrown. You can use GetDetail to check whether an index is valid, in which case it returns the sequence number of the detail otherwise -1.
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
CreateProject
Handling projects using the SDK
PrepareProject
CancelProject
WriteProject
IndexFromSeqNum
 
Samples
 
C++
 
// Update the contents of the project detail with sequence number 7 of the current project to 'Updated via SDK'
VARIANT vEmpty;
short sIndex;
vEmpty.vt = VT_EMPTY;

pProject->PrepareProject (paUpdate);

sIndex = pProject->IndexFromSeqNum (7);
if (sIndex != -1)
    pProject->UpdateDetailSel (sIndex, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, "Updated via SDK", vEmpty, vEmpty, vEmpty, vEmpty, vEmpty, vEmpty);

pProject->WriteProject (rmFullReport);

C#
 
// Update the contents of the first project detail of the current project to 'Updated via SDK'
short sIndex;

oProject.PrepareProject (ePrepareAction.paUpdate);

sIndex = oProject.IndexFromSeqNum (7);
if (sIndex != -1)
    oProject.UpdateDetailSel (sIndex, null, null, null, null, null, null, null, null, null, null, "Updated via SDK", null, null, null, null, null, null);

oProject.WriteProject (eReportMode.rmFullReport);

VBS
 
' Update the contents of the first project detail of the current project to 'Updated via SDK'
Dim sIndex

Call oProject.PrepareProject(paUpdate)

sIndex = oProject.IndexFromSeqNum(7)
If sIndex <> -1 Then
    Call oProject.UpdateDetailSel(sIndex, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, Empty, "Updated via SDK", Empty, Empty, Empty, Empty, Empty, Empty)
End If

Call oProject.WriteProject(rmFullReport)

VB.NET
 
' Update the contents of the first project detail of the current project to 'Updated via SDK'
Dim sIndex As short

oProject.PrepareProject(ePrepareAction.paUpdate)

sIndex = oProject.IndexFromSeqNum(7)
If sIndex <> -1 Then
    oProject.UpdateDetailSel(sIndex, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "Updated via SDK", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
End If

oProject.WriteProject(eReportMode.rmFullReport)