Scopo
Indica al framework se le variazioni al documento non devono essere temporaneamente sincronizzate.
Impostando la proprietà a true le modifiche al documento effettuate dal quel momento in poi non vengono sincronizzate ovvero rimangono memorizzate nella tabella ZZ_SYNC e non vengono inviate al server.
Impostando la proprietà a false le variazioni vengono contrassegnate come da inviare alla prossima sincronizzazione.
La proprietà ha come valore predefinito false.
Sintassi
Documento.suspendSync = true
Esempio di codice
// ************************************************************
// Event raised by the document after loading from the database
// ************************************************************
event Orders.AfterLoad(
boolean AlreadyLoaded // A boolean parameter that specifies whether the document was previously loaded.
)
{
// Orders in draft status should not be synchronized
if (Status == Draft)
this.suspendSync = true
}
// ****************************************************************************
// Event raised to the document during the initial steps of the document saving
// procedure
// ****************************************************************************
event throws exception Orders.BeforeSave(
inout boolean Skip // A boolean output parameter. If set to True, tell...
inout boolean Cancel // A boolean output parameter. If set to True, tell...
int Phase // An integer from 0 to 3 that specifies the progre...
)
{
if (Phase == 0 && !(SyncService.isSynchronizing))
{
if (Status != Draft && Status != getOriginalValue(Orders.Status))
this.suspendSync = false
}
}
// Event raised by the document after loading from the database
// ************************************************************
event Orders.AfterLoad(
boolean AlreadyLoaded // A boolean parameter that specifies whether the document was previously loaded.
)
{
// Orders in draft status should not be synchronized
if (Status == Draft)
this.suspendSync = true
}
// ****************************************************************************
// Event raised to the document during the initial steps of the document saving
// procedure
// ****************************************************************************
event throws exception Orders.BeforeSave(
inout boolean Skip // A boolean output parameter. If set to True, tell...
inout boolean Cancel // A boolean output parameter. If set to True, tell...
int Phase // An integer from 0 to 3 that specifies the progre...
)
{
if (Phase == 0 && !(SyncService.isSynchronizing))
{
if (Status != Draft && Status != getOriginalValue(Orders.Status))
this.suspendSync = false
}
}
Ultima modifica: 25/09/2014 / Validità: da 13.5.5800
- Questa funzionalità permette di gestire casi come quello di documenti che non devono essere inviati al server finché non escono dallo stato bozza.