La APP offline de flexygo, por defecto, envía todos los registros de aquellas tablas que tengan alguno de los bits de cambio activo, como indican los campos de las tablas _isInserted, _isDeleted, _isUpdated. Y cuando se hace un refresco de los datos, éste se realiza para todo el modelo.
En ocasiones puede ser necesario realizar un envío o recepción de datos personalizado, o sea, indicar específicamente qué tablas quiero sincronizar en un momento dado.
Para eso, hay que crear una función js como indica cualquiera de las funciones y ejemplos descritos a continuación.
Get data from server without overwrite modified rows.
- {boolean} reloadPage
- {string} jscode
- {SyncOptions} options
- {boolean} partialSync?: If true only get tables and views in syncTables and syncViews array
- {Array<string>} syncTables?: List of tables to get
- {Array<string>} syncViews: List of views to get
- {boolean} partialSend?: If true only send tables and views in syncTables and syncViews array
- {Array<string>} sendTables?: List of tables to send
- {Array<string>} sendViews?: List of views to send
EJEMPLO
Se realiza una sincronización parcial únicamente de las tablas Partes, Conf_Partes, Clientes_Datos y Contactos
Get data from server overwriting modified rows.
- {boolean} reloadPage
- {string} jscode
- {SyncOptions} options
- {boolean} partialSync?: If true only get tables and views in syncTables and syncViews array
- {Array<string>} syncTables?: List of tables to get
- {Array<string>} syncViews: List of views to get
- {boolean} partialSend?: If true only send tables and views in syncTables and syncViews array
- {Array<string>} sendTables?: List of tables to send
- {Array<string>} sendViews?: List of views to send
Sends modified rows to server.
- {SyncOptions} options
- {boolean} partialSync?: If true only get tables and views in syncTables and syncViews array
- {Array<string>} syncTables?: List of tables to get
- {Array<string>} syncViews: List of views to get
- {boolean} partialSend?: If true only send tables and views in syncTables and syncViews array
- {Array<string>} sendTables?: List of tables to send
- {Array<string>} sendViews?: List of views to send
¿Le ha sido útil este artículo?
¡Qué bien!
Gracias por sus comentarios
¡Sentimos mucho no haber sido de ayuda!
Gracias por sus comentarios
Sus comentarios se han enviado
Agradecemos su esfuerzo e intentaremos corregir el artículo