Article

Disabling and enabling activity filtering in the offline mode (mobile application)

Question

The Activities section only displays the records that the user has the rights to/is the owner of. How do I disable the the filter that only displays current user activities?

The button for adding other users' activities dissapears in the offline mode. How do I bring it back?

Answer

The Activities section only displays records of the current user to avoid synchronizing large amounts of data to the local database (this process takes a considerable amount of time). 

Important: We do not recommend disabling this filter.

A manifest schema is used to configure/remove filters. Learn more about configuring filers in the manifest in the following article - https://academy.bpmonline.com/documents/technic-sdkmob/7-12/manifest-ap…

An example of removing the filter:

"Remove": {
        "SyncOptions": {
            "ModelDataImportConfig": [
                {
                    "Name": "Activity",
                    "QueryFilter": null
                },
                {
                    "Name": "ActivityParticipant",
                    "QueryFilter": null
                }
            ]
        }
    }

To have the button show up again in the Activities section, you need to extend the Terrasoft.configuration.controller.ActivityGridPage class, namely the initializeOwnerButton method. Example:

initializeOwnerButton: function() {
   this.callParent(arguments);
   if (!Terrasoft.ApplicationUtils.isOnlineMode()) {
      var view = this.getView();
      var ownerButton = view.getOwnerButton();
      ownerButton.on("tap", this.onOwnerButtonTap, this);
   }
}

 

Like 0

Like

Share

0 comments
Show all comments