Mobile application manifest

Advanced

The mobile application manifest describes the structure of the mobile app, its objects and connections between them. The base version of the Mobile Creatio app is described in the manifest located in the MobileApplicationManifestDefaultWorkplace schema of the Mobile package.

In the process of the mobile app development, the users can add new sections and pages. All of them must be registered in the manifest for the application to be able to work with a new functionality. Since third-party developers have no ability to make changes to the manifest of the base app, the system automatically creates a new updated manifest each time a new section or page is added from the mobile application wizard. The manifest schema name is generated according to the following mask: MobileApplicationManifest[Workplace name]. For example, if the Field sales workplace is added to the mobile app, the system generates a new manifest schema with the name MobileApplicationManifestFieldForceWorkplace.

Mobile application manifest structure 

The mobile application manifest is a configuration object whose properties describe the structure of the mobile app. Table contains names and descriptions of the mobile application manifest.

Manifest configuration object properties
Property Purpose
ModuleGroups Describes the properties of the mobile app modules.
Modules Describes the properties of the mobile app modules.
SyncOptions Describes data synchronization parameters.
Models Contains configuration of the imported application models.
PreferedFilterFuncType Determines the operation that will be used to search and filter data.
CustomSchemas Connects additional schemas to the mobile app.
Icons Enables adding custom images to the app.
DefaultModuleImageId Sets default image for UI V1.
DefaultModuleImageIdV2 Sets default image for UI V2.

All properties of a configuration object in the manifest can be split into three general groups:

  • Application interface properties contain properties that implement the mobile app interface. By using the properties in this group, the application sections and main menu are shaped and custom images are configured.
  • Data and business logic properties contain properties where imported data and custom logic is described.
  • Application synchronization properties contain a single property for synchronization with the primary application.
scr_mobile_manifest_001.png

Application interface 

The conditional property group of the configuration object manifest contains properties that form the mobile application interface. By using the properties of this group, you can form application sections, main menus, custom images, etc.

Access modifiers of a page 

The mobile application version 7.11.0 or higher has the ability to configure access modificators of section or standard detail. For example, you can disable modifying, adding and deleting records for all users in the section.

To set the access in the read only mode, add the code to the schema which name contains ModuleConfig:

Setting the access in the read only mode
Terrasoft.sdk.Module.setChangeModes("UsrClaim", [Terrasoft.ChangeModes.Read]);

Or for the standard detail:

Setting the access in the read only mode for the standard detail
Terrasoft.sdk.Details.setChangeModes("UsrClaim", "StandardDetailName", [Terrasoft.ChangeModes.Read]);

As a result the adding button will be disabled on the list page and the modifying button will be disabled on the view page. The Add, Delete, Add record to the embedded detail, etc. buttons will be also disabled on the view page.

Access modificators could be combined. For example, the code could be used to disable deleting and enable creating and modifying the records:

Access modificators combining
Terrasoft.sdk.Module.setChangeModes("UsrClaim", [Terrasoft.ChangeModes.Create, Terrasoft.ChangeModes.Update]);

All access modificators are given in the Terrasoft.ChangeModes enumeration.

Control elements 

You can add the following control elements to the section page:

  • Terrasoft.ColumnSet column groups;
  • Terrasoft.EmbeddedDetail embedded details;
  • standard details;
  • inheritor components of the Terrasoft.RecordPanelItem class.

Use the mobile application wizard to add the first three types of control elements.

To add an inheritor component of the Terrasoft.RecordPanelItem class to the section page:

  1. Extend the Terrasoft.RecordPanelItem class with a custom class. Define the component configuration object and the functionality methods in the custom class.
  2. Create a section settings schema (Mobile[Section]ModuleConfig). Using the addPanelItem() method of the Terrasoft.sdk.RecordPage class in the schema, implement adding the created component to the section page.
  3. Add the new custom schemas to the mobile application manifest.

Application data and business logic 

The group of properties of a configuration object in the mobile app manifest. contains properties that describe imported data, as well as custom business logic for processing data in the mobile app.

Application synchronization 

The conditional property group of the manifest configuration object contains a single property used to synchronize data with the main application.

Set up the mobile application menu
Advanced

Example. Setting up the mobile application menu with two groups — the main group and the Sales group.

Example implementation 

The ModuleGroups property
// Mobile application module groups.
"ModuleGroups": {
    // Main menu group setup.
    "main": {
        // Group position in the main menu.
        "Position": 0
    },
    // [Sales] menu group setup. 
    "sales": {
        // Group position in the main menu.
        "Position" 1
    }
}
Set up the start page and menu sections in the mobile application
Advanced

Example. Set up the application sections:

  1. Main menu sections: Contacts, Accounts.
  2. The application starting page: the Contacts section.

Strings containing the section titles should be created in the LocalizableStrings manifest schema block:

  • ContactSectionTitle with the "Contacts" value.
  • AccountSectionTitle with the "Accounts" value.

Example implementation 

The Modules property
// Mobile application modules.
"Modules": {
    // "Contact" section.
    "Contact": {
        // The application menu group that contains the section.
        "Group": "main",
        // Model name that contains the section data.
        "Model": "Contact",
        // Section position in the main menu group.
        "Position": 0,
        // Section title.
        "Title": "ContactSectionTitle",
        // Custom image import to section.
        "Icon": {
            // Unique image ID.
            "ImageId": "4c1944db-e686-4a45-8262-df0c7d080658"
        },
        // Custom image import to section.
        "IconV2": {
            // Unique image ID.
            "ImageId": "9672301c-e937-4f01-9b0a-0d17e7a2855c"
        },
        // Menu display checkbox.
        "Hidden": false
    },
    // "Account" section.
    "Account": {
        // The application menu group that contains the section.
        "Group": "main",
        // Model name that contains the section data.
        "Model": "Account",
        // Section position in the main menu group.
        "Position": 1,
        // Section title.
        "Title": "AccountSectionTitle",
        // Custom image import to section.
        "Icon": {
            // Unique image ID.
            "ImageId": "c046aa1a-d618-4a65-a226-d53968d9cb3d"
        },
        // Custom image import to section.
        "IconV2": {
            // Unique image ID.
            "ImageId": "876320ef-c6ac-44ff-9415-953de17225e0"
        },
        // Menu display checkbox.
        "Hidden": false
    }
}
Set up the model configuration
Advanced

Example. Add the following model configurations to the manifest:

  1. Contact. Specify list page, view and edit page schema names, required models, model extension modules and model pages.
  2. Contact address. Specify only the model extension module.

Example implementation 

The Models property
// Importing models.
"Models": {
    // "Contact" model.
    "Contact": {
        // List page schema.
        "Grid": "MobileContactGridPage",
        // Display page schema.
        "Preview": "MobileContactPreviewPage",
        // Edit page schema.
        "Edit": "MobileContactEditPage",
        // The names of the models the "Contact" model depends on.
        "RequiredModels": [
            "Account", "Contact", "ContactCommunication", "CommunicationType", "Department",
            "ContactAddress", "AddressType", "Country", "Region", "City", "ContactAnniversary",
            "AnniversaryType", "Activity", "SysImage", "FileType", "ActivityPriority",
            "ActivityType", "ActivityCategory", "ActivityStatus"
        ],
        // Model extensions..
        "ModelExtensions": [
            "MobileContactModelConfig"
        ],
        // Model page extensions.
        "PagesExtensions": [
            "MobileContactRecordPageSettingsDefaultWorkplace",
            "MobileContactGridPageSettingsDefaultWorkplace",
            "MobileContactActionsSettingsDefaultWorkplace",
            "MobileContactModuleConfig"
        ]
    },
    // "Contact addresses" model.
    "ContactAddress": {
        // List, display and edit pages were generated automatically.
        // Model extensions..
        "ModelExtensions": [
            "MobileContactAddressModelConfig"
        ]
    }
}
Use the substring search function for data search
Advanced

Example. Use the substring search function for data search.

Example implementation 

The PreferedFilterFuncType property
// Substring search function is used to search for data.
"PreferedFilterFuncType": "Terrasoft.FilterFunctions.SubStringOf"

Attention. If the function specified as the data filtering function in the PreferedFilterFuncType section is not Terrasoft.FilterFunctions.StartWith, then indexes will not be used while searching database records.

Load model data upon synchronization
Advanced

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.

Example implementation 

The SyncOptions property
// 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": []
        }
    ]
}
Display the page in full screen mode on tablets
Easy

If you view Creatio mobile application's section page on a tablet, the section list will be displayed on the left by default.

mobile_standart_mode.png

Example. Activate full screen mode on tablets.

Implement the example 

Add the TabletViewMode property with the “SinglePage” value to the mobile application manifest to display the section page in full screen mode.

The TabletViewMode property
{
    "TabletViewMode": "SinglePage",
    "CustomSchemas": [],
    "SyncOptions": {
        "SysSettingsImportConfig": [],
        "ModelDataImportConfig": []
    },
    "Modules": {},
    "Models": {}
}

After you save the schema and restart the mobile application, the tablet will display the section page in full screen mode.

Add a standard detail with columns
Advanced

Use the Mobile application wizard to add a detail to the section of mobile application.

If the detail object is not a section object of the Mobile Creatio application, the detail will display the id of the connected section record instead of record values. Configure the schema of the detail page to display values.

Example. Add the Job experience detail on the edit page of the Contacts section of mobile application. Display the Job title column as primary column.

Example implementation algorithm 

1. Add the Job experience detail via the mobile application wizard 

Use the mobile application wizard to add a detail on the record edit page. To do this:

  1. Open the necessary workplace (for example Main workplace) and click the Set up sections.
  2. Select the Contacts section and click the Details setup button.
  3. Set up the Job experience detail.
    scr_detail_settings.png

After saving the setup of detail, section and workplace, the Job experience detail will be displayed in the mobile application.

scr_detail_onpage.png

If the Job experience detail object is not a section object of the Mobile Creatio application, the detail will display the value of the Contact primary column (id of the connected record of the contact).

scr_detail_id.png

2. Create module schema in which to configure the detail list 

Use the Configuration section to create custom module in the custom package with following properties:

  • Title – "Contact Career Configuration”.
  • Name – “UsrContactCareerModuleConfig”.
scr_module_props.png

Add the source code to the module schema:

UsrContactCareerModuleConfig
// Setting the [Job title] column as primary column.
Terrasoft.sdk.GridPage.setPrimaryColumn("ContactCareer", "JobTitle");
// Adding the [Job title] column to the primary column collection.
Terrasoft.sdk.RecordPage.addColumn("ContactCareer", {
        name: "JobTitle",
        position: 1
    }, "primaryColumnSet");
// Delete the [Contact] previous primary column  from the primary column collection.
Terrasoft.sdk.RecordPage.removeColumn("ContactCareer", "Contact", "primaryColumnSet");

In this code:

  • ContactCareer – name of the table that corresponds to the detail (as a rule it matches the name of the detail object).
  • Job Title – name of the column that shoul be displayed on the page.

3. Connect the module schema in the mobile application manifest 

To apply list settings performed in the UsrContactCareerModuleConfig module, perform following:

  1. Open the schema of the mobile application manifest (MobileApplicationManifestDefaultWorkplace) in the custom module designer. This schema is created in the custom package by the mobile application wizard.
  2. Add the UsrContactCareerModuleConfig module to the PagesExtensions section of the ContactCareer model.
    ContactCareer
    {
        "SyncOptions": {
            ...
        },
        "Modules": {},
        "Models": {
            "ContactCareer": {
                "RequiredModels": [
                    ...
                ],
                "ModelExtensions": [],
                "PagesExtensions": [
                    ...
                    "UsrContactCareerModuleConfig"
                ]
            },
            ...
        }
    }
    
  3. Save the schema of the mobile application manifest.

As a result, the Job experience detail will display records by the Job title column.

scr_result.png

Attention. To display the columns after set up clean the mobile application cache. You may need to compile the application using the corresponding action in the Configuration section.

Add a custom widget to the mobile application
Advanced

The Mobile Creatio application supports dashboards since version 7.10.3 (version 7.10.5 of the mobile application). To receive settings and data for a dashboard, use the AnalyticsService service. The following widget types are supported: “Chart”, “Indicator”, “List” and “Gauge”.

To add a custom widget to the mobile application:

  1. Implement a widget setup interface in the Creatio application.
  2. Add the instance of the implemented custom widget to the application.
  3. Configure the display of the widget in the mobile application.

Attention. This article only describes the implementation of widget display in the mobile application.

To display a custom widget in the mobile application:

  1. Implement the data receiving process of a custom widget.
  2. Add the implementation of displaying the widget in the mobile application.

Example. Add a custom widget to the dashboards page of the mobile application.

Example implementation algorithm 

1. Implementation of the data receiving process of a custom widget 

To receive data of each custom widget type, create a class that will implement the IDashboardItemData interface or will be inherited from the BaseDashboardItemData base class. To do this, the class must be decoded by the DashboardItemData attribute. To implement the class, add the Source code schema to the custom package.

The class implementation to the CustomDashboardItem custom widget type.

CustomDashboardItem
namespace Terrasoft.Configuration
{
    using System;
    using Newtonsoft.Json.Linq;
    using Terrasoft.Core;
    
    // Attribute indicating the custom widget type.
    [DashboardItemData("CustomDashboardItem")]
    public class CustomDashboardItemData : BaseDashboardItemData
    {
        // Class constructor.
        public CustomDashboardItemData(string name, JObject config, UserConnection userConnection, int timeZoneOffset)
            : base(name, config, userConnection, timeZoneOffset)
        {
            
        }
        // A method that returns the required data.
        public override JObject GetJson()
        {
            JObject itemObject = base.GetJson();
            itemObject["customValue"] = DateTime.Now.ToString();
            return itemObject;
        }
    }
}

2. Implementation of displaying a custom type of a widget. 

2.1. Add a data displaying class 

To do this, create a client module in a custom package (for example, UsrMobileCustomDashboardItem). In the created module, implement a class that extends the Terrasoft.configuration.controls.BaseDashboardItem base class.

UsrMobileCustomDashboardItem
Ext.define("Terrasoft.configuration.controls.CustomDashboardItem", {
    extend: "Terrasoft.configuration.controls.BaseDashboardItem",
    // Displays the value transferred through the customValue property. 
    updateRawConfig: function(config) {
        this.innerHtmlElement.setHtml(config.customValue);
    }

});

2.2. Add a new type and a class that implements this type to the Terrasoft.DashboardItemClassName enumeration 

Add the source code to the module created on a previous step.

CustomDashboardItem
Terrasoft.DashboardItemClassName.CustomDashboardItem = "Terrasoft.configuration.controls.CustomDashboardItem";

2.3. Add a name of a new custom schema to the mobile application manifest 

In the mobile application manifest file, add the name of the created module schema to the CustomSchemas array.

CustomSchemas
{
    "SyncOptions": {
        ...
    },
    "CustomSchemas": ["UsrMobileCustomDashboardItem"],
    "Modules": {...},
    "Models": {...}
}

After saving all changes, the widget will be displayed in the Dashboars section of the mobile application.

scr_result.png

Attention. Add the dashboard widget to the main Creatio application. The mobile application will be synchronized with the main application and the widget will be displayed there.

Add a button to display the name of the contact
Advanced

Example. Add a button to the edit page of the Contacts section of the mobile application. Clicking on the button must trigger a message with the full name of the contact.

Example implementation algorithm 

1. Create a custom Terrasoft.RecordPanelItem inheritor class 

Use the Configuration section to create a custom module in the custom package with the following properties:

  • Title – “Custom control class”.
  • Name – “UsrCustomRecordPanelItem”.
mobile_addControl_create_class.png

Add the source code to the method:

CustomRecordPanelItem
Ext.define("Terrasoft.controls.CustomRecordPanelItem", {
    extend: "Terrasoft.RecordPanelItem",
    xtype: "cftestrecordpanelitem",
    config: {
        items: [
            {
                xtype: "container",
                layout: "hbox",
                items: [
                    {
                        xtype: "button",
                        id: "clickMeButton",
                        text: "Full name",
                        flex: 1
                    }
                ]
            }
        ]
    },
    initialize: function() {
        var clickMeButton = Ext.getCmp("clickMeButton");
        clickMeButton.element.on("tap", this.onClickMeButtonClick, this);
    },
    onClickMeButtonClick: function() {
        var record = this.getRecord();
        Terrasoft.MessageBox.showMessage(record.getPrimaryDisplayColumnValue());
    }
});

The class defines a configuration object for the created control element and two following methods:

  • initialize() – button click event handler method.
  • onClickMeButtonClick() – the method initializes the created element and binds button click events to the handler method.

2. Create module schema in which to configure the section page 

Use the Configuration section to create a custom module in the custom package with the following properties:

  • Title – “Contact module config”.
  • Name – “UsrMobileContactModuleConfigDefaultWorkplace”.
mobile_addControl_create_module_config.png

Add the source code to the module schema:

UsrMobileContactModuleConfigDefaultWorkplace
Terrasoft.sdk.RecordPage.addPanelItem("Contact", {
    xtype: "cftestrecordpanelitem",
    position: 1,
    componentConfig: {
    }
});

The addPanelItem() method of the Terrasoft.sdk.RecordPage class is called at this point. The method adds the created control element to the section page.

3. Connect the module schemas in the mobile application manifest 

To apply section page settings implemented in the UsrMobileContactModuleConfigDefaultWorkplace module:

  1. Open the schema of the mobile application manifest (MobileApplicationManifestDefaultWorkplace) in the custom module designer. This schema is created in the custom package by the mobile application wizard.
  2. Add the UsrCustomRecordPanelItem module to the CustomSchemas section, and the UsrContactCareerModuleConfig module to the PagesExtensions section of the Contact model:
    Modules adding
    {
        "CustomSchemas": [
            "UsrCustomRecordPanelItem.js"
        ],
        "SyncOptions": {},
        "Modules": {},
        "Models": {
            "Contact": {
                "RequiredModels": [],
                "ModelExtensions": [],
                "PagesExtensions": [
                    "UsrMobileContactModuleConfigDefaultWorkplace.js"
                ]
            }
        }
    }
    
  3. Save the schema of the mobile application manifest.

As a result, the contact page will have a control element. A click on the element will trigger a message with the full name of the contact.

Case result. Adding a button
mobile_addControl_result.png
Case result. Click the button
mobile_addControl_result2.png
ModuleGroups property
Advanced

Application module groups. Uses for for the menu group setup. Describes the upper-level group setting of the mobile application main menu. The ModuleGroups property sets a list of named configuration objects for each menu group with the only possible Position property.

The configuration object property 

Position

Group position in the main menu. Strats with 0.

Modules property
Advanced

A mobile application module is an application section. Each module in the Modules configuration object manifest describes a configuration object with properties given in table. The name of the configuration section object must match the name of the model that provides section data.

Configuration object properties 

Group

The application menu group that contains the section. Set by the string containing the menu section name from the ModuleGroups property of the manifest configuration object.

Model

Model name that contains the section data. Set by the string containing the name of one of the models included in the Models property of the manifest configuration object.

Position

Section position in the main menu group. Set by a numeric value starting with 0.

Title

Section title. String with the section title localized value name. Section title localized value name should be added to the LocalizableStrings manifest schema block.

Icon

This property designed to import custom images to the version 1 user interface menu section.

IconV2

This property designed to import custom images to the version 2 user interface menu section.

Hidden

Checkbox that defines a section is displayed in the menu (true — hidden, false — displayed). Optional property. By default — false.

Icons property
Advanced

This property is designed to import custom images to the mobile application.

It is set by the configuration objects array, each containing properties from the table.

Configuration object properties 

ImageListId

Image list ID.

ImageId

Custom image ID from the ImageListId list.

Use of custom images
// Custom images import.
"Icons": [
    {
        // Image list ID.
        "ImageListId": "69c7829d-37c2-449b-a24b-bcd7bf38a8be",
        // Imported image ID.
        "ImageId": "4c1944db-e686-4a45-8262-df0c7d080658"
    }
]
DefaultModuleImageId and DefaultModuleImageIdV2 properties
Advanced

Properties are designed to set unique default image IDs for newly created sections or sections that don't contain IDs of the images in the Icon or IconV2 properties of the Modules property of the configuration object manifest.

Installation of unique image identifiers
// Custom interface V1 default image ID.
"DefaultModuleImageId": "423d3be8-de6b-4f15-a81b-ed454b6d03e3",
// Custom interface V2 default image ID.
"DefaultModuleImageIdV2": "1c92d522-965f-43e0-97ab-2a7b101c03d4"
Models property
Advanced

The Models property contains imported application models. Each model in a property is described by a configuration object with a corresponding name. The model configuration object properties are listed in table.

Configuration object properties 

Grid

Model list page schema name. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page.

Preview

Preview page schema name for model element. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page.

Edit

Edit page schema name for model element. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page.

RequiredModels

Names of the models that the current model depends on. All models, whose columns are added to the current model, as well as columns for which the current model has external keys.

ModelExtensions 

Model extensions. An array of schemas, where additional model settings are implemented (adding business rules, events, default values, etc.).

PagesExtensions

Model page extensions. An array of schemas where additional settings for various page types are implemented (adding details, setting titles, etc.).

PreferedFilterFuncType property
Advanced

The property defines the operation used for searching and filtering data in the section, detail and lookup lists. The value for the property is specified in the Terrasoft.FilterFunctions enumeration. The list of filtering functions is available in table.

Filtering functions (Terrasoft.FilterFunctions) 

SubStringOf

Determines whether a string passed as an argument, is a substring of the property string.

ToUpper

Returns values of the column specified in the property in relation to upper list.

EndsWith

Verifies if the property column value ends with a value passed as argument.

StartsWith

Verifies if the property column value starts with a value passed as argument.

Year

Returns year based on the property column value.

Month

Returns month based on the property column value.

Day

Returns day based on the property column value.

In

Checks if the property column value is within the value range passed as the function argument.

NotIn

Checks in the property column value is outside the value range passed as the function argument.

Like

Determines if the property column value matches the specified template.

If the current property is not explicitly initialized on the manifest, then by default the Terrasoft.FilterFunctions.StartWith function is used for search and filtering, as this ensures the proper indexes are used in the SQLite database tables.

CustomSchemas property
Advanced

The CustomSchemas property is designed for connecting additional schemas to the mobile app (custom schemas with source code in JavaScript) that expand the functionality. This can be additional classes implemented by developers as part of a project, or utility classes that implement functions to simplify development, etc.

The value of the property is an array with the names of connected custom schemas.

Connect additional custom schemas for registering actions and utilities
// Connect additional custom schemas.
"CustomSchemas": [
    // Custom action registration schema.
    "MobileActionCheckIn",
    // Custom utility schema.
    "CustomMobileUtilities"
]
SyncOptions property
Advanced

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

The configuration object properties for the synchronization setup 

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 is added to the ModelDataImportConfig array.

The configuration object properties for the synchronization model setup 

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.

Filter model configuration object properties 

type

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

Possible values (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.

Possible values (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.

Possible values (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.

Possible values (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.

Possible values (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.

Possible values (Terrasoft.ComparisonType)
Equal equal
LessOrEqual less or equal
NotEqual not equal
Greater greater
GreaterOrEqual greater or equal
Less less

The SyncOptions.ModelDataImportConfig.QueryFilter property 

Available in the application starting with version 7.12.1 and in the mobile application starting with version 7.12.3.

The QueryFilter synchronization property enables to configure data filtering of the specific model when importing via the DataService service. Previously, the SyncFilter property was used to filter data and the import was performed via the OData service.

Attention. Data import via the DataService service is available only for the Android and iOS platforms. The OData is used for the Windows platform.

The QueryFilter filter is a set of parameters in the form of JSON object that are sent in the request to the DataService service.

Example of the exists filter
{
  "SyncOptions": {
     "ModelDataImportConfig": [
        {
           "Name": "ActivityParticipant",
           "QueryFilter": {
              "logicalOperation": 0,
              "filterType": 6,
              "rootSchemaName": "ActivityParticipant",
              "items": {
                 "ActivityFilter": {
                    "filterType": 5,
                    "leftExpression": {
                       "expressionType": 0,
                       "columnPath": "Activity.[ActivityParticipant:Activity].Id"
                    },
                    >"subFilters": {
                       "logicalOperation": 0,
                       "filterType": 6,
                       "rootSchemaName": "ActivityParticipant",
                       "items": {
                          "ParticipantFilter":{
                             "filterType": 1,
                             "comparisonType": 3,
                             "leftExpression": {
                                "expressionType": 0,
                                "columnPath": "Participant"
                             },
                             "rightExpression": {
                                "expressionType": 1,
                                "functionType": 1,
                                "macrosType": 2
                             }
                          }
                       }
                    }
                 }
              }
           }
        }
     ] 
  }
}