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

Manifest. Data and business logic properties

Glossary Item Box

General provisions

The groupof 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. For more information about the mobile application manifest and all its properties, please refer to the "Mobile application manifest" article.

The Models property

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 1.

Table 1. Model configuration object properties

Property Value
Grid Model list page schema name. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page. Optional.
Preview Preview page schema name for model element. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page. Optional.
Edit Edit page schema name for model element. The page will be generated automatically with the following name: Mobile[Model_name][Page_type]Page. Optional.
RequiredModels Names of the models that the current model depends on. Optional property. 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. Optional property. An array of schemas, where additional model settings are implemented (adding business rules, events, default values, etc.).
PagesExtensions Model page extensions. Optional property. An array of schemas where additional settings for various page types are implemented (adding details, setting titles, etc.).

Case 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.

The Models property of a manifest configuration item must look like this:

// 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"
        ]
    }
}

The PreferedFilterFuncType property

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 a an enumeration Terrasoft.FilterFunctions enumeration. The list of filtering functions is available in table 2.

Table 2. Filtering functions (Terrasoft.FilterFunctions)

Function Value
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.

Case example

Use the substring search function for data search.

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

// 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.

The CustomSchemas property

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.

Case example

Connect additional custom schemas for registering actions and utilities.

// 
"CustomSchemas": [
    // Custom action registration schema.
    "MobileActionCheckIn",
    // Custom utility schema.
    "CustomMobileUtilities"
]
© Creatio 2002-2020.

Did you find this information useful?

How can we improve it?