Question

Due to special characters, or because of the long file name, synchronization does not take place.

It is necessary to change the name of the file so that it is displayed.

Answer

To customize the display of the file name, you need to make the following changes in the manifest (example in the Activities section on the ActivityFile details): set the UseRecordIdAsFileName flag to true for the binary column Data. Thus, file names will be generated based on the record ID.

"SyncOptions": {
    "ModelDataImportConfig": [
        {
            "Name": "ActivityFile",
            "SyncColumns": [
                "Id",
                "Name",
                {
                    "Name": "Data",
                    "UseRecordIdAsFileName": true
                },
                "Activity",
                "Type"
            ]
        }
    ]
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

Required "Organization"  field is affixed to the contact object "at the application level"

In the mobile app:



- Create a new contact

- Fill in the "Organization" field (created earlier in the web app)

- Save

- Synchronize

- An error occurs

Call Stack:

Contact (9d6652ba-5062-45d2-a7f2-1fb6c3ba1978) at Wed May 16 2018 11:13:07 GMT + 0300 (MSK). Error text: Type: Terrasoft.ODataRequiredColumnsEmptyValuesException

Message: The Organization field is a required field.

AdditionalInfo: {"position": 0, "error": {"code": "3", "message": {"value": "The Organization field is required"}, "innererror": {"message": "Organization field is required", "type": "Terrasoft.Core.Entities.RequiredColumnsEmptyValuesException", "stacktrace": "in Terrasoft.Core.Entities.Entity.ValidateRequiredColumns () \ r \ n in Terrasoft.Core.Entities .Entity.InternalSave (Boolean validateRequired, Boolean setColumnDefValue) \ r \ n in Terrasoft.Core.Entities.Entity.Save (Boolean validateRequired, Boolean setColumnDefValue) \ r \ n in Terrasoft.Core.Entti.SerathiraADe.V. \ r \ n in Terrasoft.Core.Entities.Services.ServiceContext.SaveChanges () "," internalexception ": null}}}

Everything works correctly if the field is not required.

Answer

Contact and Account objects are bound by cyclic links (for example, in a mobile application, both a contact and an account (as well as the connection between them) can be added).

Therefore, when synchronizing records, requests are split for correct storage: 

First, creating a contact record, then creating an account, then the lookup fields of the connections between them are updated with the necessary values of the newly created data. Thus, the binding will not work.

As a workaround, we can propose making it required at the card level using business rules:

Terrasoft.sdk.Model.addBusinessRule('Contact', {
    ruleType: Terrasoft.RuleTypes.Requirement,
    triggeredByColumns: ['Name']
});

Then add the required module to the manifest in the ModelExtensions section.

An example implementation can be found in the "MobileActivityModelConfig" schema.

Like 0

Like

Share

0 comments
Show all comments

Symptoms

An error occurs during synchronization:

The element with the "90a3e9f6-........................-7c4aadb41f28" identifier is not found.

Cause

The SysLookup table is not used in desktop versions 7.5 and 7.6, but is used in the mobile application below version 7.7.1.

In the SysLookup table, there are records that refer to nonexistent schemas, for example:

90A3E9F6-12D4-45B5-9122-7C4AADB41F28

A85932A3-30A5-49D7-9627-7F749A055AB7

CCF7D813-FC83-47AD-BE61-8F3B3B98A54F

E0AA5FA2-0910-478D-943B-E9C2579AD7B4

Solution

Run script:

UPDATE [SysLookup]
SET IsSimple = 0
WHERE IsSimple = 1
AND NOT EXISTS (select 1 from SysSchema ss WHERE ss.[UId] = SysEntitySchemaUId)

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms

An error occurs during synchronization: The element with the identifier "90a3e9f6 -........................- 7c4aadb41f28" was not foundю

Cause

The SysLookup table is not used in desktop versions 7.5 and 7.6, but is used in the mobile application below version 7.7.1.

There are records in the SysLookup table that refer to nonexistent schemas, e.g., with such UIDs:

90A3E9F6-12D4-45B5-9122-7C4AADB41F28

A85932A3-30A5-49D7-9627-7F749A055AB7

CCF7D813-FC83-47AD-BE61-8F3B3B98A54F

E0AA5FA2-0910-478D-943B-E9C2579AD7B4

Solution

Run the following script:

UPDATE [SysLookup]
SET IsSimple = 0
WHERE IsSimple = 1
AND NOT EXISTS (select 1 from SysSchema ss WHERE ss.[UId] = SysEntitySchemaUId)

Necessary conditions and possible restrictions

Some versions of BPMonline 7.6

Mobile app version is lower than 7.7.0

Like 0

Like

Share

0 comments
Show all comments

Symptoms

While accessing one of the section in the mobile app, the following error is displayed:

Terrasoft.SourceCodeException

Сообщение: TypeError: undefined is not an object (evaluating 'Terrasoft.sdk.RecordPage.getColumns(model, columnSetName).

get(columnName).columnOriginalConfig')

Additional information:

Script: file:///private/var/mobile/Containers/Bundle/Application/4C00C070-499C-4318-9653-8938B2A3B608/bpm'online.app/www/Common/Terrasoft.Mobile.Combined.js%0D%0A%09Line: 7698"

Cause

The user deleted the base column via the designer

Solution

1. In the configuration, create a new "module" with the name UsrMobileOverrideUtilities

Add the following text:

Ext.define("Terrasoft.sdk.RecordPage.Override", {
    override: "Terrasoft.sdk.RecordPage",
    configureColumn: function(model, columnSetName, columnName, columnConfig) {
        if (!Terrasoft.sdk.RecordPage.getColumns(model, columnSetName).get(columnName)) {
            return;
        }
        this.callParent(arguments);
    }
});

2. Change the custom manifest (usually called UsrMobileApplicationManifestCustom)

Add the following block:

"CustomSchemas": [
    "UsrMobileOverrideUtilities"
],

Necessary conditions and possible restrictions

The base column was used in one of the base mobile application scripts.

Like 0

Like

Share

0 comments
Show all comments

Question

1. Is it possible to use filterMethod for a detail (similarly to the main application), or in any way use an arbitrary filter and not just a filter based on the column of the parent page?

2. How to disable the ability to add, delete and edit detail records, depending on the values on the parent page?

Answer

1. For details, you can specify filters using the configure() method of the corresponding sdk-class:

Terrasoft.sdk.Details.configure("Contact", "ActivityDetailV2StandartDetail", {
   filters: Ext.create("Terrasoft.Filter", {
      type: Terrasoft.FilterTypes.Group,
      subfilters: [
         Ext.create("Terrasoft.Filter", {
            compareType: Terrasoft.ComparisonTypes.NotEqual,
            property: "Type",
            value: Terrasoft.GUID.ActivityTypeEmail
         })
      ]
   })
});

2. In general, changing the mode of detail operation is done like this:

Terrasoft.sdk.Details.setChangeModes("Contact", "ActivityDetailV2StandartDetail", [Terrasoft.ChangeModes.Read]);

But if you need to change the mode of operation based on the condition, then there is a getChangeModes() method for this purpose in the page controllers. In the controllers of the corresponding pages (grid, view, edit) you need to expand the following method:

getChangeModeOperations: function() {
   var detailConfig = this.getDetailConfig();
   if (detailConfig) {
      var parentRecord = detailConfig.parentRecord;
      if (parentRecord.get("IsNonActualEmail") === false) {
         return {
            canCreate: false,
            canUpdate: false,
            canDelete: false
         };
      }
   }
   return this.callParent(arguments);
}

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms

When synchronizing/entering a mobile application section, the following error is displayed:

Type: Terrasoft.SourceCodeException 

Message: Uncaught TypeError: Cannot read property 'ColumnConfigs' of null 

Additional information: 

        Script: file:///android_asset/www/Common/Terrasoft.Mobile.Combined.js%0D%0A%09Line: 19048 

Calls sequence: 

    at Ext.define.showException (file:///android_asset/www/Common/Terrasoft.Mobile.Combined.js:33105:41

    at Ext.define.showUncaughtException (file:///android_asset/www/Common/Terrasoft.Mobile.Combined.js:1965:25

    at window.onerror (file:///android_asset/www/Common/Terrasoft.Mobile.Combined.js:1666:20)

Cause

Schema duplication in the manifest

Solution

#1

In the base MobileApplicationManifest schema of the Mobile package change the following string:

…
Models: {
    …
    Activity: {
        …
        RequiredModels: [
            'Contact', 'ActivityType', 'ActivityStatus',
            'ActivityResult', 'ActivityCategory', 'ActivityPriority', 'Contact', 
            'Account', 'Opportunity', 'Lead', 'ActivityParticipantRole',
            'ActivityParticipant', 'ActivityCategoryResultEntry', 'ActivityCorrespondence', 'Activity'

Remove duplicate "Contact" value

#2

Update mobile app to a more recent version.

Necessary conditions and possible restrictions

BPMonline Version 7.1.0 - 7.5.0

Mobile application version:

Android 7.6.2. - 7.6.3.

iOS 7.6.2

Like 0

Like

Share

0 comments
Show all comments

Symptoms

Type: Terrasoft.ODataSecurityException% 0D% 0A Message: Not enough rights to change the record in the object "Activity"% 0D% 0A Additional information:% 0D% 0A% 09 {"error": {"code": "5", "message": {" lang ":" "," value ":" Not enough rights to change the record in the object \ "Activity \" "}," innererror ": {" message ":" Not enough rights to change the record in the object \ "Activity \" ", "type": "System.Security.SecurityException", "stacktrace": "in Terrasoft.Core.Entities.Entity.UpdateInDB (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Entity.Save (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Services.EntityLazyProxy.SaveChanges () \ r \ n in Terrasoft.Core.Entities.Services.ServiceContext.SaveChanges () \ r \ n in System.Data.Services.DataService`1. HandleNonBatchRequest (RequestDescription description) \ r \ n in System.Data.Services.DataService`1.H andleRequest ()"}}}%0D%0A% 0D%0A

Type: Terrasoft.ODataSecurityException% 0D% 0A Message: Not enough rights to change the record in the object" Activity "% 0D% 0A Additional Information:%0D%0A%09 {" error " : {"code": "5", "message": {"lang": "", "value": "Not enough rights to change the record in the object \" Activity \ ""}, "innererror": {"message" : "Not enough permissions to change the record in the \" Activity \ "", "type": "System.Security.SecurityException", "stacktrace": "in Terrasoft.Core.Entities.Entity.UpdateInDB (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Entity.Save (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Services.EntityLazyProxy.SaveChanges () \ r \ n in Terrasoft.Core.Entities.Services.ServiceContext.SaveChext ) \ r \ n in System.Data.Services.DataService`1.HandleNonBatchRequest (RequestDescription description) \ r \ n System.Data.Services.DataService`1.HandleRequest () "}}}%0D%0A%0D% 0A

Type: Terrasoft.ODataSecurityException% 0D% 0APost: Not enough permissions to change the record in the" Activity "% 0D% 0AAdditional information: % 0D% 0A% 09 {"error": {"code": "5", "message": {"lang": "", "value": "Not enough rights to change the record in the object \" Activity \ "" }, "innererror": {"message": "Not enough rights to change the record in the object \" Activity \ "", "type": "System.Security.SecurityException", "stacktrace": "in Terrasoft.Core.Entities. Entity.UpdateInDB (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Entity.Save (Boolean validateRequired) \ r \ n in Terrasoft.Core.Entities.Services.EntityLazyProxy.SaveChanges () \ r \ n in Terrasoft. Core.Entities.Services.ServiceContext.SaveChanges () \ r \ n in System.Data.Services.DataService`1.HandleNonBatchRequest (R equestDescription description) \ r \ n in System.Data.Services.DataService`1.HandleRequest ()"}}}% 0D%0A% 0D%0A

Cause

The access rights to the objects of the mobile application are not distributed and the organizational structure is not updated.

Solution

1. If the user has not been previously added to the configuration, then go to the “Configuration Management”, “Administration: Access to Objects” menu, detail “Access to default records: Change” and add a user/role;

2. Perform the action “Update the organizational structure”;

3. Distribute access rights to mobile application objects;

4. Re-sync from your mobile device.

Necessary conditions and possible restrictions



Access to the system under a user account with administrator rights.

Like 0

Like

Share

0 comments
Show all comments

Symptoms

The mobile app cannot synchronize in online mode (but syncs fine in offline mode).

Cause

In some configurations of IIS and .NET Framework, ASP.NET avoids special characters while processing the URL. URLs containing the "$" symbol are used when integrating with OData (bpm'online mobile application). This feature can be turned in the web.config file.

Solution

Perform the following steps with system administrator rights.

  1. Go to the folder with the application source files (for example, C:\bpm\7.8.0.1681_SalesEnterprise_Softkey_MSSQL_ENU). The path to the folder is arbitrary, and is usually specified by the system administrator of the application.
  2. Using notepad, open the web.config file found in the root folder.
  3. Find the section (Ctrl + F).
  4. Add the following string to this section - 
  5. Save the changes.

  6. Open the second web.config file, located in the folder with the Terrasoft.WebApp application (for example, "C:\ bpm\7.8.0.1681_SalesEnterprise_Softkey_MSSQL_ENU\Terrasoft.WebApp") and repeat steps 2-5.
  7. Reload the application on IIS and clean Redis.

We recommend creating backups of both web.config files before you start. 

Note: This situation occurs only when using the online mode - https://academy.bpmonline.com/documents/mobile/7-13/onlineoffline-modes

Necessary conditions and possible restrictions

System administrator rights.

 

Like 0

Like

Share

0 comments
Show all comments

Question

The list of orders is not displayed correctly in the mobile app. How should I set up the application to sort the orders by registration date (the latest added order should be at the top)?

Answer

To sort by a specific column, you need to implement additional logic in the mobile app manifest. For example:

Terrasoft.sdk.GridPage.setOrderByColumns("Order", {
    column: "CreatedOn",
    orderType: Terrasoft.OrderTypes.DESC
});

This happens because there was no default sorting mechanism in this mobile application section. Below is an example:

 

- Add the “UsrTestOrderMobile” object with the required columns

- Register the detail in the detail wizard

- Add detail in the mobile application wizard

- Configure the sorting mechanism. Create a new custom schema, e.g., “UsrMobileUsrTestOrderMobileModuleConfig” with the following code:

Terrasoft.sdk.GridPage.setOrderByColumns("UsrTestOrderMobile", {
    column: "UsrName",
    orderType: Terrasoft.OrderTypes.DESC
});

- Save changes

- Connect it to the manifest in the “Models” section of the required “PagesExtensions” detail object

- clear the cache and re-synchronize (to get the most recent settings)

Important:



- make sure all the necessary columns are synchronized in the import settings (ModelDataImportConfig)



- make sure there was a primary column (which is used for sorting) for display in an object or at the code level (below is an example):

Terrasoft.sdk.GridPage.setPrimaryColumn("UsrTestOrderMobile", "UsrName");
Terrasoft.sdk.RecordPage.addColumn("UsrTestOrderMobile", {
        name: "UsrName",
        position: 1
    }, "primaryColumnSet");

 

Like 0

Like

Share

0 comments
Show all comments