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 synchronize.
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 property Name of model column to filter. Requires the modelName Name of model to filter. Specifies whether the filtering is performed by the columns of the connected model. assocProperty Connected model column by which the main model is connected. The primary column is a column to connect. operation Type of filter operation from the General Default filtration. Any Filtration by the compareType Comparison type of filter operation. Takes values from the Equal LessOrEqual NotEqual Greater GreaterOrEqual Less funcArgs An array of parameter values for the method specified in the name The name of a filter or filter group. valueIsMacros Defines whether the filtered value is a macro. true The filter uses a macro. false The filter does not use a macro. value Value of the column from the CurrentUserContactId ID of current user. CurrentDate Current date. CurrentDateTime Current date and time. CurrentDateEnd End of the current date. CurrentUserContactName Current contact name. CurrentUserContact ID and name of current contact. SysSettings System setting value. Requires the CurrentTime Current time. CurrentUserAccount ID and name of current account. GenerateUId Generated ID. macrosParams Macro parameters. Required for the isNot Specifies whether to use the negation logical operator. true The negation logical operator is used. false The negation logical operator is not used. functionType Function type applied to the model column specified in the SubStringOf Determines whether the string passed as a parameter is a substring of the ToUpper Changes the column value specified in the EndsWith Verifies whether the value specified in the StartsWith Verifies whether the value specified in the Year Returns year based on the Month Returns month based on the Day Returns day based on the In Verifies if the NotIn Verifies if the Like Determines if the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QueryFilter | Configure data filtering of the specific model when synchronizing data. The filterType Filter type from the Simple Filter that has one condition. Group Filter that has multiple conditions. logicalOperation The logical operation to combine a collection of filters from the Or Logical operation And Logical operation subfilters A collection of filters applied to a model. Requires the Obligatory property for the filter type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SyncColumns | An array of model columns whose data to synchronize. Except from listed columns, Mobile Creatio synchronizes the system columns ( |
SyncRules
Synchronization rules. Creatio applies synchronization rules for all operation modes of Mobile Creatio.
Parameters
modelDataImportConfigName | Model name from the | ||||||||||||||||||||||
importOptions | Data to synchronize. When the adapterType Type of data synchronization module. Required for the Entity The module to synchronize data from the object specified in the Approval The module to synchronize approvals. ESN The module to synchronize feed. entityName The object from which to synchronize data. Required for the columns An array of model columns whose data to synchronize. If you omit the property, Mobile Creatio synchronizes all the columns. You can specify the column using one of the following templates: View the examples that add model columns whose data to synchronize using different templates below. Parameters (for column of the path Column code. expand Defines whether to synchronize primary columns ( true Synchronize primary columns ( false Do not synchronize primary columns ( filters Configure data filtering of the specific model when synchronizing data. The | ||||||||||||||||||||||
related | An array of related synchronization rules. Mobile Creatio uses related synchronization rules automatically when synchronizing data. ruleName Code of synchronization rule. |
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
InvoiceModule
synchronization 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, Mobile Creatio 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
MobileInvoiceGridPageSettings
schema 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
MobileInvoiceRecordPageSettings
schema 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, Mobile Creatio 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 synchronize. */
"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"
}
]
}
}
}
}