English
Instant Developer Foundation Documentazione
  • Reference Librerie
  • Document Orientation
  • ID Document
  • Servizi
  • Sincronizzazione

Suspend Sync

proprietà link

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
  }
}
  • Questa funzionalità permette di gestire casi come quello di documenti che non devono essere inviati al server finché non escono dallo stato bozza.

Ultima modifica: 25/09/2014 / Validità: da 13.5.5800

Hai trovato utile l'articolo?

Grazie per il feedback!

Ti serve altro aiuto?

Consulta il Forum