Venice
Sales::Update
 
Updates a Sales Document.
 
void Update (
    enum eUpdateMode eUpdateMode
)
 
Parameters
eUpdateMode
[in] A value of the 'eUpdateMode' enumeration.
 
Remarks
A document can always be modified using the dialog (eInsertMode = imDialog or eInsertMode = imDialogFromData). The use of other modes is possible, but the changes will be limited to the data of the header. If you want to update a document without user interface, you can use the PrepareDocument method. For more information, see 'Handling accounting documents using the SDK'.
Updating a record destroys the object positioning that was previously established via a SeekBy-method and the GetNext/GetPrevious-methods. The results of calling GetNext or GetPrevious after an update are not guaranteed.
 
See Also
CreateSales
SeekBySysNum
 
Samples
 
C++
 
// Update the last inserted record using the dialog
if (pSales->SeekBySysNum (smLast, 0))
    pSales->Update (umDialog);

C#
 
// Update the last inserted record using the dialog
if (oSales.SeekBySysNum (eSeekMode.smLast, 0))
    oSales.Update (eUpdateMode.umDialog);

VBS
 
' Update the last inserted record using the dialog
If oSales.SeekBySysNum(smLast, 0) Then
    Call oSales.Update(umDialog)
End If

VB.NET
 
' Update the last inserted record using the dialog
If oSales.SeekBySysNum(eSeekMode.smLast, 0) Then
    oSales.Update(eUpdateMode.umDialog)
End If