Article

How to add exclusion filtering (Mobile)

Question

At the moment, the synchronization does not complete successfully, due to the fact that the application (in the "Activities" section) contains a large number of files that the mobile application is trying to synchronize and as a result ends with a timeout error.

The analysis revealed that the main file type is mostly images used in email signatures (have the name "image").

Is it possible to set up the filtering mechanism in such a way that does not upload the extra files?

Answer

Add a filtering mechanism, which will ignore files related to the signature during synchronization. Add the following code to the mobile application manifest (MobileApplicationManifestDefaultWorkplace):

{
    "SyncOptions": {
        "SysSettingsImportConfig": [],
        "ModelDataImportConfig": [
            {
                "Name": "ActivityFile",
                "SyncFilter": {
                    "property": null,
                    "valueIsMacros": false,
                    "value": null,
                    "isNot": true,
                    "type": "Terrasoft.FilterTypes.Group",
                    "logicalOperation": "Terrasoft.FilterLogicalOperations.Or",
                    "subfilters": [
                        {
                            "property": "Name",
                            "funcType": "Terrasoft.FilterFunctions.SubStringOf",
                            "funcArgs": ["image"] //the word used to filter the images
                        },
                        {
                            "property": "Activity.Owner",
                            "isNot": true,
                            "valueIsMacros": true,
                            "value": "Terrasoft.ValueMacros.CurrentUserContact"
                        }
                    ]
                }
            }
        ]
    },
    "Modules": {},
    "Models": {}
}

If this is a FieldForce product, then you also need to add the same code to the "MobileApplicationManifestFieldForceWorkplace" manifest.

Like 0

Like

Share

0 comments
Show all comments