Venice
PInvce::SetSyncValues
 
Sets the synchronization values of this Purchase Invoice.
 
void SetSyncValues (
    BYTE bySyncStatus,
    BSTR bsSyncReference,
    VARIANT_BOOL bSyncProtected
)
 
Parameters
bySyncStatus
[in] The synchronization status of the record. If the synchronization fields are activated, Venice sets the synchronization status of a new record to 1. If an existing record is modified and its synchronization reference is completed, then Venice will set the synchronization status to 2. When records are inserted or updated using ClSdk, the synchronization fields will never be changed, unless you explicitly call the method SetSyncValues.
bsSyncReference
[in] The synchronization reference of the record. It allows an external application to identify and to find a record in Venice. The value must be blank or unique. No duplicate values are allowed.
bSyncProtected
[in] The synchronization protected flag of the record. If the synchronization protected flag is completed, the record cannot be modified or deleted in Venice or via a dialog box started in a ClSdk application.
 
Remarks
The synchronization fields (status, reference and protected) cannot be set by calling SetFieldVal (), because in Venice they are read only.
 
See Also
CreatePInvce
Browse
Update
 
Samples
 
C++
 
// Select a record and set the synchronization status, reference and protected flag
if (pPInvce->Browse (VARIANT_FALSE))
{
    pPInvce->SetSyncValues (0, "EXT14", VARIANT_FALSE);
    pPInvce->Update (umFullReport);
}

C#
 
// Select a record and set the synchronization status, reference and protected flag
if (oPInvce.Browse (false) != 0)
{
    oPInvce.SetSyncValues (0, "EXT14", false);
    oPInvce.Update (eUpdateMode.umFullReport);
}

VBS
 
' Select a record and set the synchronization status, reference and protected flag
If oPInvce.Browse(False) <> 0 Then
    Call oPInvce.SetSyncValues(0, "EXT14", False)
    Call oPInvce.Update(umFullReport)
End If

VB.NET
 
' Select a record and set the synchronization status, reference and protected flag
If oPInvce.Browse(False) <> 0 Then
    oPInvce.SetSyncValues(0, "EXT14", False)
    oPInvce.Update(eUpdateMode.umFullReport)
End If