Creatio development guide
PDF
This documentation is valid for Creatio version 7.10.0. We recommend using the newest version of Creatio documentation.

Manifest. Application synchronization properties

Glossary Item Box

General information

The conditional property group of the manifest configuration object contains a single property used to synchronize data with the main application. Read more about the mobile application manifest and its properties in the "Mobile application manifest" article.

SyncOptions Property

Describes the options for configuring data synchronization. Contains the configuration object with properties presented in table 1.

Table 1 The configuration object properties for the synchronization setup.

Property Value
ImportPageSize The number of pages imported in the same thread.
PagesInImportTransaction The number of import threads.
SysSettingsImportConfig Imported system settings array.
SysLookupsImportConfig Imported system lookups array.
ModelDataImportConfig An array of models that will load the data during synchronization.

In the ModelDataImportConfig model array, you can 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 with the model name in the array. If the model needs to apply additional conditions for synchronization, the configuration object with properties given in table 2 is added to the ModelDataImportConfig array.

Table 2 The configuration object properties for the synchronization model setup.

Property Value
Name Model name (see Models property of the manifest configuration object).
SyncColumns The column models array for which data is imported. In addition to the listed columns, the system columns (CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) and primary displayed columns will also be imported during synchronization.
SyncFilter The filter applied to the model during import

The SyncFilter is applied to the model during import is a configuration object with properties given in table 3.

Table 3 Filter model configuration object properties.

Property Value
type

Filter type. Set by the enumeration value Terrasoft.FilterTypes. Optional property. By default Terrasoft.FilterTypes.Simple.

Filter types (Terrasoft.FilterTypes):

Simple Filter with one condition.
Group Group filter with multiple conditions.
logicalOperation

The logical operation for combining a collection of filters (for filters with Terrasoft.FilterTypes.Group type). Set by the enumeration value Terrasoft.FilterLogicalOperations. By default - Terrasoft.FilterLogicalOperations.And.

Logical operation types (Terrasoft.FilterLogicalOperations):

Or Logical operation OR.
And Logical operation AND.
subfilters A collection of filters applied to a model. Obligatory property for the filter type Terrasoft.FilterTypes.Group. The filters are interconnected by the logical operation set in the logicalOperation property. Each filter is a configuration filter object.
property Filtered column model name. Obligatory property for the filter type Terrasoft.FilterTypes.Simple.
valueIsMacrosType The checkbox that defines whether the filtered value is a macro. Optional property can be: true if the filter uses a macro, and false if it doesn't.
value

Value of the column filtration set in the property property. Obligatory property for the filter type Terrasoft.FilterTypes.Simple. Can be set directly by the filter value (including null) or a macro (the valueIsMacrosType property must be set to true). Macros that can be used as the property value are contained in the Terrasoft.ValueMacros enumeration.

Value macros (Terrasoft.ValueMacros):

CurrentUserContactId Current user ID.
CurrentDate Current date.
CurrentDateTime Current date and time.
CurrentDateEnd Current date end.
CurrentUserContactName Current contact name.
CurrentUserContact Current contact name and ID.
SysSettings System setting value. The system setting name is included in the macrosParams property.
CurrentTime Current time.
CurrentUserAccount Current account name and ID.
GenerateUId Generated ID.
macrosParams Values transitioned to macros as parameters. Optional property. This property is now used only for the Terrasoft.ValueMacros.SysSettings macro.
isNot Applied to the negation operator filter. Optional property. Takes the true value if the the negation operator is applied to the filter, otherwise — false.
funcType

Function type applied to the model column set in the property property. Optional property. Takes values from the Terrasoft.FilterFunctions enumeration. Argument values for the filtration functions are set in the funcArgs property. The value to compare the result of the function is specified by the value property.

Filtration functions (Terrasoft.FilterFunctions):

SubStringOf Determines whether the string passed in as an argument is a substring of the property column.
ToUpper Changes the column value set in the property to uppercase.
EndsWith Checks whether the value in the property column ends with the value set as an argument.
StartsWith Checks if the value of the property column starts with the value set as an argument.
Year Returns the year value according to the property column.
Month Returns the month value according to the property column.
Day Returns the day value according to the property column.
In Checks the occurrence of the value of the column property in the range of values that is passed as argument to the function.
NotIn Checks for the absence of the value of the column property in the range of values that is passed as an argument to the function.
Like Determines whether the value of the column property with the specified template.
funcArgs An array of argument values for the function filter defined in the funcType property. The order of the values in the array funcArgs must match the order of parameters of the funcType function.
name The name of a filter or group of filters. Optional property.
modelName Filtered model name. Optional property 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 serves as a connecting column of the main model.
operation

Filtration operation type. Optional parameter. Takes values from the Terrasoft.FilterOperation enumeration. By default — Terrasoft.FilterOperation.General.

Filtration operations (Terrasoft.FilterOperation):

General Standard filtration.
Any Filtration by the exists filter.
compareType

Filter comparison operation type. Optional parameter. Takes values from the Terrasoft.ComparisonType enumeration. By default — Terrasoft.ComparisonType.Equal.

Comparison operations (Terrasoft.ComparisonType):

Equal Equal.
LessOrEqual Less or equal.
NotEqual Not equal.
Greater Greater.
GreaterOrEqual Greater or equal.
Less Less.

Example

During synchronization, the data for the following models has to be loaded into the mobile application:

  1. Activity All columns are loaded. While the model is being filtered, only the activities with the current user listed as a participant are loaded.
  2. Activity type — a full model is loaded.

The SyncOptions property of the manifest configuration object must look like this:

// Synchronization settings
"SyncOptions": {
    // The number of pages imported in the same thread.
    "ImportPageSize": 100,
    // The number of import threads.
    "PagesInImportTransaction": 5,
    // Imported system settings array.
    "SysSettingsImportConfig": [
        "SchedulerDisplayTimingStart", "PrimaryCulture", "PrimaryCurrency", "MobileApplicationMode", "CollectMobileAppUsageStatistics", "CanCollectMobileUsageStatistics", "MobileAppUsageStatisticsEmail", "MobileAppUsageStatisticsStorePeriod", "MobileSectionsWithSearchOnly", "MobileShowMenuOnApplicationStart", "MobileAppCheckUpdatePeriod", "ShowMobileLocalNotifications", "UseMobileUIV2"
    ],
    // Imported system lookups array.
    "SysLookupsImportConfig": [
        "ActivityCategory", "ActivityPriority", "ActivityResult", "ActivityResultCategory", "ActivityStatus", "ActivityType", "AddressType", "AnniversaryType", "InformationSource", "MobileApplicationMode", "OppContactInfluence", "OppContactLoyality", "OppContactRole", "OpportunityStage", "SupplyPaymentDelay", "SupplyPaymentState", "SupplyPaymentType"],
    // An array of models that will load the data during synchronization.
    "ModelDataImportConfig": [
        // Activity model configuration.
        {
            "Name": "Activity",
            // The filter applied to the model during import
            "SyncFilter": {
                // Filtered column model name.
                "property": "Participant",
                // Filtered model name.
                "modelName": "ActivityParticipant",
                // Connected model column by which the main model is connected.
                "assocProperty": "Activity",
                // Filtration operation type.
                "operation": "Terrasoft.FilterOperations.Any",
                // A macro is used for filtration.
                "valueIsMacros": true,
                // Column filtration value — current contact ID and name.
                "value": "Terrasoft.ValueMacros.CurrentUserContact"
            },
            // The column models array for which data is imported.
            "SyncColumns": [
                "Title", "StartDate", "DueDate", "Status", "Result", "DetailedResult", "ActivityCategory", "Priority", "Owner", "Account", "Contact", "ShowInScheduler", "Author", "Type"
            ]
        },
        // The ActivityType model is loaded in full. 
        {
            "Name": "ActivityType",
            "SyncColumns": []
        }
    ]
}

See Also

© bpm'online 2002-2017.

Did you find this information useful?

How can we improve it?