SyncOptions schema section
SyncOptions schema section describes the options for configuring data synchronization.
Properties
ImportPageSize
The number of pages to synchronize in the same thread.
PagesInImportTransaction
The number of threads to synchronize.
SysSettingsImportConfig
An array of system settings to synchronize.
SysLookupsImportConfig
An array of lookups to cache. Usually, this array includes database tables that are frequently used by users, such as types, categories, and similar items.
ModelDataImportConfig
An array of models whose data to load during synchronization. Specify additional synchronization parameters, the list of available columns and filter conditions for each model. If you need to load a full model during synchronization, specify the object code.
Parameters
Name | Model name from the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SyncFilter | The filter applied to the model during synchronization. The Parameters
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QueryFilter | Configure data filtering of the specific model when synchronizing data. The Parameters
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SyncColumns | An array of model columns whose data to synchronize. Except from listed columns, Creatio Mobile synchronizes the system columns ( |
SyncRules
Synchronization rules. Creatio applies synchronization rules for all operation modes of Creatio Mobile.
Parameters
modelDataImportConfigName | Model name from the | ||||||||||||||||||||||
importOptions | Data to synchronize. When the Parameters
filters Configure data filtering of the specific model when synchronizing data. The | ||||||||||||||||||||||
related | An array of related synchronization rules. Creatio Mobile uses related synchronization rules automatically when synchronizing data. Parameters
|
Creatio lets you apply synchronization rules in the following ways:
-
when you launch synchronization in the background or log in to the app
View the example that creates
InvoiceModulesynchronization rule for the Invoice section below.Modules schema section"Modules": {"Invoice": {"screens": {"start": {"schemaName": "MobileInvoiceGridPageSettingsFlutterTest"},"edit": {"schemaName": "MobileInvoiceRecordPageSettingsFlutterTest"}},"syncRules": ["InvoiceModule"],"Group": "main","Model": "Invoice","Position": 5,"isStartPage": false,"Title": "InvoiceSectionTitle","Hidden": false}},"SyncOptions": {"ModelDataImportConfig": [{"Name": "Invoice","IsAdministratedByRights": true,"SyncColumns": ["Contact","Account","Number","StartDate","PaymentStatus","Owner","Currency","CurrencyRate"]}],"SyncRules": {"InvoiceModule": {"modelDataImportConfigName": "Invoice","related": [{"ruleName": "InvoiceModule_InvoiceProduct"}]},"InvoiceModule_InvoiceProduct": {"importOptions": {"adapterType": "Entity","entityName": "InvoiceProduct"}}}},As a result, Creatio Mobile will synchronize data of the Invoice section when you log in to the app and in the background.
-
when you work with a section
-
Add synchronization rules to the Freedom UI page schema that configures the section.
View the example that adds synchronization rules to the
MobileInvoiceGridPageSettingsschema that configures the Invoice Freedom UI section below.viewModelConfig schema section"viewModelConfig": {"attributes": {"Items": {"viewModelConfig": {"cacheConfig": {"syncRuleName": "InvoiceModule"},},"name": "Attribute_Items"},"name": "Attributes"},"name": "ViewModelConfig"} -
Add synchronization rules to the Freedom UI page schema that configures the section page.
View the example that adds synchronization rules to the
MobileInvoiceRecordPageSettingsschema that configures the invoice page of the Invoice Freedom UI section below.viewModelConfig schema section"viewModelConfig": {"cacheConfig": {"syncRuleName": "InvoiceModule_InvoiceProduct"},"attributes": {...}"name": "ViewModelConfig"}
As a result, Creatio Mobile will synchronize data of the Invoice section automatically when you work with the section.
-
When you hide the section, bound synchronization rules no longer apply.
View the example of SyncOptions schema section below.
{
"SyncOptions": {
/* The number of pages to synchronize in the same thread. */
"ImportPageSize": 100,
/* The number of threads to synchronize. */
"PagesInImportTransaction": 5,
/* An array of system settings to synchronize. */
"SysSettingsImportConfig": [
"SchedulerDisplayTimingStart", "PrimaryCulture", "PrimaryCurrency", "MobileApplicationMode", "CollectMobileAppUsageStatistics", "CanCollectMobileUsageStatistics", "MobileAppUsageStatisticsEmail", "MobileAppUsageStatisticsStorePeriod", "MobileSectionsWithSearchOnly", "MobileShowMenuOnApplicationStart", "MobileAppCheckUpdatePeriod", "ShowMobileLocalNotifications", "UseMobileUIV2"
],
/* An array of lookups to cache. Usually, this array includes database tables that are frequently used by users, such as types, categories, and similar items. */
"SysLookupsImportConfig": [
"ActivityCategory", "ActivityPriority", "ActivityResult", "ActivityResultCategory", "ActivityStatus", "ActivityType", "AddressType", "AnniversaryType", "InformationSource", "MobileApplicationMode", "OppContactInfluence", "OppContactLoyality", "OppContactRole", "OpportunityStage", "SupplyPaymentDelay", "SupplyPaymentState", "SupplyPaymentType"
],
/* An array of models whose data to load during synchronization. */
"ModelDataImportConfig": [
{
/* Model name from the "Models" schema section. */
"Name": "ActivityParticipant",
/* The filter applied to the model during synchronization. */
"SyncFilter": {
/* Name of model column to filter. */
"property": "Participant",
/* Name of model to filter. */
"modelName": "ActivityParticipant",
/* Connected model column by which the main model is connected. */
"assocProperty": "Activity",
/* Type of filter operation from the "Terrasoft.FilterOperation" enumeration. */
"operation": "Terrasoft.FilterOperations.Any",
/* Defines whether the filtered value is a macro. */
"valueIsMacros": true,
/* Value of the column from the "property" property. */
"value": "Terrasoft.ValueMacros.CurrentUserContact"
},
/* Configure data filtering of the specific model when synchronizing data. */
"QueryFilter": {
/* The logical operation to combine a collection of filters from the "Terrasoft.FilterLogicalOperations" enumeration. */
"logicalOperation": 0,
/* Filter type from the "Terrasoft.FilterTypes" enumeration. */
"filterType": 6,
/* Root schema name. */
"rootSchemaName": "ActivityParticipant",
"items": {
"ActivityFilter": {
"filterType": 5,
/* Expression of the left side of the filter condition. */
"leftExpression": {
/* "Column" expression type. */
"expressionType": 0,
/* The column to filter. */
"columnPath": "Activity.[ActivityParticipant:Activity].Id"
},
/* A collection of filters applied to a model. */
"subFilters": {
"logicalOperation": 0,
"filterType": 6,
"rootSchemaName": "ActivityParticipant",
"items": {
"ParticipantFilter": {
"filterType": 1,
/* Comparison type of filter operation. */
"compareType": 3,
"leftExpression": {
"expressionType": 0,
"columnPath": "Participant"
},
"rightExpression": {
"expressionType": 1,
/* Function type applied to the model column specified in the "property" property. */
"functionType": 1,
"macrosType": 2
}
}
}
}
}
}
},
/* An array of model columns whose data to synchronize. */
"SyncColumns": [
"Title", "StartDate", "DueDate", "Status", "Result", "DetailedResult", "ActivityCategory", "Priority", "Owner", "Account", "Contact", "ShowInScheduler", "Author", "Type"
]
},
/* Option to load all model columns. */
{
"Name": "ActivityType",
"SyncColumns": []
}
],
/* Synchronization rules. */
"SyncRules": {
"ApprovalModule": {
"importOptions": {
"adapterType": "Approval"
}
},
"ActivityModule": {
/* Data to synchronize. */
"importOptions": {
/* Type of data synchronization module. */
"adapterType": "Entity",
/* The object from which to synchronize data. */
"entityName": "Activity"
},
/* An array of related synchronization rules. */
"related": [
{
/* Code of synchronization rule. */
"ruleName": "ActivityModule_Participant"
}
]
}
}
}
}