Question

How can I add a loading mask to the [Connected to] detail of the [Accounts] section (version 7.7.0) in a diagram display mode?

Answer

To add a loading mask to the [Connected to] detail of the [Accounts] section in a diagram display mode, create a replacing client module for the AccountRelationshipDetailV2 schema and insert the following code therein:

define("AccountRelationshipDetailV2", [], function() {
    return {
        methods: {
            loadRelationship: function() {
                this.set("MaskId", Terrasoft.Mask.show({
                    selector: "#RelationshipTabContainer"
                }));
                this.callParent(arguments);
            },
 
            relationshipDiagramServiceCallback: function(response) {
                this.callParent(arguments);
                Terrasoft.Mask.hide(this.get("MaskId"));
            }
        },
 
        diff: /**SCHEMA_DIFF*/ []/**SCHEMA_DIFF*/
    };
});

Save the schema and reload the application page with clearing the cache.

 

Like 0

Like

Share

0 comments
Show all comments

Question

Mobile app. How to add the "Add" button to the lookup field which does not have its own section?

Answer

According to the base logic of the mobile application, you can only add new values in the lookup fields only if there is a section for this field with an edit page (for example, the “Owner” field and the “Contacts” section). In order to implement the "Add" button, you need to add a separate edit page and all necessary columns.

To do this:

Create a page schema with an Edit type for the Usrnomberoflid object (for example, the name of the UsrnomberoflidEditPage schema (page)). Quick page code generation mechanisms are described in the "How to quickly generate a page code for the mobile application" article:

Terrasoft.LastLoadedPageData = {
    controllerName: "Terrasoft.configuration.UsrnomberoflidEditPageController",
    viewXClass: "Terrasoft.configuration.UsrnomberoflidEditPageView"
};
 
Ext.define("Terrasoft.configuration.view.UsrnomberoflidEditPage", {
    extend: "Terrasoft.view.BaseEditPage",
    alternateClassName: "Terrasoft.configuration.UsrnomberoflidEditPageView",
    config: {
        id: "UsrnomberoflidEditPage"
    }
});
 
Ext.define("Terrasoft.configuration.controller.UsrnomberoflidEditPage", {
    extend: "Terrasoft.controller.BaseEditPage",
    alternateClassName: "Terrasoft.configuration.UsrnomberoflidEditPageController",
    statics: {
        Model: Usrnomberoflid
    },
    config: {
        refs: {
            view: "#UsrnomberoflidEditPage"
        }
    }
});

Create a schema and register the columns that we want to display on the page (for example, the name of the UsrMobileUsrnomberoflidModuleConfig schema (setting up columns in a new page)):

Terrasoft.sdk.GridPage.setPrimaryColumn("Usrnomberoflid", "Name");
Terrasoft.sdk.RecordPage.addColumnSet("Usrnomberoflid", 
    {
        name: "primaryColumnSet",
        isPrimary: true
    }, 
    [
        {
            name: "Name"
        }
    ]);
Terrasoft.sdk.RecordPage.addColumn("Usrnomberoflid", {
    name: "CreatedOn"
}, "primaryColumnSet");

Connect these schemas to the manifest. For example, "UsrMobileApplicationManifestOpportunities":

"Usrnomberoflid": {
    "Edit": "UsrnomberoflidEditPage",
    "RequiredModels": [
        "Usrnomberoflid"
    ],
    "PagesExtensions": [
        "UsrMobileUsrnomberoflidModuleConfig"
    ]
},

Now if you click on a record, all its information will be displayed; if you swipe across the field from right to left, you will see a list of available values with a quick filter.

Like 0

Like

Share

0 comments
Show all comments

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

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

We need to add a "LinkedIn" communication option type to the  [Communication options] detail.

I mean, we do not need to add a new "Web" communication option and paste a link to the LinkedIn contact profile, but to add a link which would have the "LinkedIn" name.

Answer

1. In the [Communication option types] lookup, add a new communication option and name it, e.g., "LinkedIn", the Communication type - Web

2. On the LinkedIn record, click "Edit" and find the recordId.

3. In configuration, replace the CommunicationUtils schema by copying the code from the original schema. Add ConfigurationConstants in the dependency as it is in the original.

4. In the replaced schema, update the isWebType() method by adding a recordId (see above) verification block and return true.

function isWebType(communicationType) {
    if (!communicationType) {
        return false;
    }
 
    if (communicationType === "5e4025d7-84cf-43ce-9a90-64a966c34853") {
        return true; /*LinkedIn*/
    }
 
    communicationType = communicationType.value || communicationType;
    return ConfigurationConstants.CommunicationTypes.Web.indexOf(communicationType) !== -1;
}

5. Save the changes, clear the cache, reset the site. As a result, the new LinkedIn communication option will look and will be processed as a link.

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

Question

The field with image does not work for a detail (see instruction at https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-field-…).

Answer

This instruction is relevant for page schemas; for details, add the following method:

getSchemaImageUrl: function(primaryImageColumnValue) {
        if (!primaryImageColumnValue) {
            return null;
        }
        var imageConfig = {
            source: Terrasoft.ImageSources.SYS_IMAGE,
            params: {
                primaryColumnValue: primaryImageColumnValue.value
            }
        };
        return Terrasoft.ImageUrlBuilder.getUrl(imageConfig);
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

We have a "+" sign on the side panel in sms, which can be used for quick adding of a new order, case, call, etc. But when I select this option, e.g., of adding a case, bpm'online starts stuttering and no case window opens (the same refers to the order and task/call).

Answer

The "Quick add" menu contents can be edited in the " Quick add menu setup" lookup as an "Item of quick add menu". One of its columns – "Add page" – is the "Section edit page" type, that refers to the "VwSysModuleSchemaEdit" database view instead of a table.

In the code of this view, there is a connectio to the "Default" workplace name, which in your case is renamed for "DefaultFlat". Consequently, none of the view pages was visible to you. Likewse, none could be called as a "quick add" menu option.

To solve your case, rename the old VwSysModuleSchemaEdit in the database for e.g.,"VwSysModuleSchemaEdit_Old"  and execute the script for adding a new view:

CREATE VIEW [dbo].[VwSysModuleSchemaEdit]
AS
SELECT
       se.Id as 'Id',
       se.CreatedOn as 'CreatedOn',
       se.CreatedById as 'CreatedById',
       se.ModifiedOn as 'ModifiedOn',
       se.ModifiedById as 'ModifiedById',
       se.ProcessListeners as 'ProcessListeners',
       se.PageCaption as 'PageCaption',
       se.TypeColumnValue as 'TypeColumnValue',
       se.SysModuleEntityId as 'SysModuleEntityId',
       ss.Caption as 'EditPageCaption',
       ss.Name as 'EditPageName'
FROM SysModuleEdit se
inner join VwSysSchemaInWorkspace ss ON ss.UId = se.CardSchemaUId
       and ss.SysWorkspaceId = (SELECT Id FROM SysWorkspace WHERE Name = 'DefaultFlat')
WHERE
       exists(SELECT null FROM SysModule sm WHERE sm.SysModuleEntityId = se.SysModuleEntityId)
       and exists(SELECT vss.Caption FROM VwSysSchemaInWorkspace vss WHERE vss.UId = se.CardSchemaUId)
GO

To implement the changes, clear the browser cache and update the website page.

Like 0

Like

Share

0 comments
Show all comments