Case

When I click "Add" on the [Products] detail in an order, I get an error that the total payment sum per order does not correspond the sum of products.

The same happens when I do it for the installment plan.

Answer

When you add a product, bpm'online saves the page. Though the "OrderStatus" base lookup has been changed in this case. During saving, the system checks the correspondence of the sums and the OrderPageV2 page code of the Passport package fails:

validateOrderStatus: function(callback, scope) {
    var result = {
        success: true
    };
    var status = this.get("Status");
    var primaryAmount = this.get("PrimaryAmount");
    var OrderStatus = OrderConfigurationConstants.Order.OrderStatus;
    if (status && (status.value === OrderStatus.InPlanned || status.value === OrderStatus.Canceled)) {
        callback.call(scope || this, result);
        return;
    }
    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
        rootSchemaName: "SupplyPaymentElement"
    });
    esq.addAggregationSchemaColumn("PrimaryAmountPlan", Terrasoft.AggregationType.SUM,
"PrimaryAmountPlanSum");
    var filters = Terrasoft.createFilterGroup();
    filters.addItem(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,
"Order", this.get("Id")));
    filters.addItem(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,
"Type", OrderConfigurationConstants.SupplyPaymentElement.Type.Payment));
    esq.filters = filters;
    esq.getEntityCollection(function(response) {
        if (response.success) {
            var collection = response.collection;
            if (collection.getCount() > 0 && primaryAmount !==
collection.getByIndex(0).get("PrimaryAmountPlanSum")) {
                result.message = this.get("Resources.Strings.ValidateOrderStatus");
                result.success = false;
            }
        } else {
            return;
        }
        callback.call(this, result);
    }, scope);

Instruction

var status = this.get("Status"); - returns undefined

collection.getByIndex(0).get("PrimaryAmountPlanSum"))  - returns 0

This causes the verification failure and provides notifications for the "Planned" status.

To solve the issue, replace the OrderConfigurationConstant module and specify the correct Ids in it. This way, the below code:

if (status && (status.value === OrderStatus.InPlanned || status.value === OrderStatus.Canceled)) {
    callback.call(scope || this, result);
    return;
}

will be performed successfully.

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms

Implementation of the case:

  1. In the schedule, open an activity with the following fields populated on the "Connected to" detail: [Lead], [Invoice] and [Project/task];
  2. click the link to open the page of the connected object;
  3. open the "History" tab -> "Activities";
  4. add a new activity to the detail.

As a result, you receive a console error with the following message: 

message: Cannot read property 'replaceCls' of null.

The page of the new activity opens, but when you save and close all of the opened pages, you get back to the schedule displayed in a vertical list and see a blank space with inactive action buttons where the activity page should be. 

Cause

The openCardInChain method is blocked in ActivitySectionV2 as follows:

openCardInChain: function(config) {
   if (this.isSchedulerDataView() && (config.operation === ConfigurationEnums.CardStateV2.ADD)) {
      var historyStateInfo = this.getHistoryStateInfo();
      if (historyStateInfo.workAreaMode === ConfigurationEnums.WorkAreaMode.COMBINED) {
         this.closeCard();
      }
   }
   return this.callParent(arguments);
},

This code is available starting from version 7.3.0.

Solution

In version 7.7.0 this behavior must be corrected. To quickly correct it in the configuration, replace the ActivitySectionV2  schema and override the openCardInChain method in it as follows:

openCardInChain: function(config) {
   if (config.isLinkClick) {
      return false;
   }
   this.saveCardScroll();
   this.scrollCardTop();
   this.showBodyMask();
   var historyState = this.sandbox.publish("GetHistoryState");
   var stateObj = config.stateObj || {
            isSeparateMode: config.isSeparateMode || true,
            schemaName: config.schemaName,
            entitySchemaName: config.entitySchemaName,
            operation: config.action || config.operation,
            primaryColumnValue: config.id,
            valuePairs: config.defaultValues,
            isInChain: true
 };
   this.sandbox.publish("PushHistoryState", {
      hash: historyState.hash.historyState,
      silent: config.silent,
      stateObj: stateObj
   });
   var moduleName = config.moduleName || "CardModuleV2";
   var moduleParams = {
      renderTo: config.renderTo || this.renderTo,
      id: config.moduleId,
      keepAlive: (config.keepAlive !== false)
   };
   var instanceConfig = config.instanceConfig;
   if (instanceConfig) {
      this.Ext.apply(moduleParams, {
         instanceConfig: instanceConfig
 });
   }
   this.sandbox.loadModule(moduleName, moduleParams);
   return true;
}

 

Like 0

Like

Share

0 comments
Show all comments

Question

It is necessary to disable the ability to download files during synchronization, but still leave the option to download files from a mobile app.

Answer

You can disable the binary data transfer from the configuration. The mobile application will not download files while synchronizing with the main app, but the user will still have the ability to download files or upload them.

An example based on knowledge base files:

In the manifest, in the "ModelDataImportConfig" section for the "KnowledgeBaseFile" Data column, set the "ImportBinaryData" sign to false.

{
    "Name": "KnowledgeBaseFile",
    "SyncColumns": [
        {
            "Name": "Data",
            "UseRecordIdAsFileName": false,
            "ImportBinaryData": false
        } 
    ]
}

 

Like 0

Like

Share

0 comments
Show all comments

Case

I need to add custom macro to WORD to convert the entered data.

Solution

  1. Create a new [Source code] schema in the configuration.
  2. The schema content should be taken from the DateTimeExpressionConveter schema.
  3. From line 22, change the code for the needed one:
ExpressionConverterAttribute("<MacrosName>")]
public class <MacrosName>ExpressionConveter : IExpressionConverter {
    public string Evaluate(object value, string arguments = "") {
        string dateFormat = "dd.MM.yyyy";
        if (!arguments.IsNullOrEmpty()) {
            dateFormat = arguments;
        }
        DateTime date;
        if (DateTime.TryParse((string)value, out date)) {
            return date.ToString(dateFormat);
        }
        return string.Empty;
    }
}

Addding macro to the displayed value is performed in Word, read more at https://academy.bpmonline.com/documents/technic-sdk/7-7/how-create-own-…

Like 0

Like

Share

0 comments
Show all comments

Question

I cannot compile anything, bpm'online cannot find the system setting values, section wizard does not work, etc.

Compilation error.The System setting element with the "CodeCompilerWarningLevel" code not found.

Answer

The user deleted the Supervisor user. The solution to restore the Supervisor is provided below:

------
INSERT INTO Contact (Id, Name, AccountId, OwnerId, GenderId, TypeId) VALUES ('410006E1-CA4E-4502-A9EC-E54D922D2C00',
'Supervisor', 'E308B781-3C5B-4ECB-89EF-5C1ED4DA488E', '410006E1-CA4E-4502-A9EC-E54D922D2C00',
'EEAC42EE-65B6-DF11-831A-001D60E938C6', '60733EFC-F36B-1410-A883-16D83CAB0980')
------
 
INSERT INTO [dbo].[SysAdminUnit]
  ([Id]
  ,[CreatedOn]
  ,[CreatedById]
  ,[ModifiedOn]
  ,[ModifiedById]
  ,[Name]
  ,[Description]
  ,[ParentRoleId]
  ,[ContactId]
  ,[TimeZoneId]
  ,[UserPassword]
  ,[SysAdminUnitTypeValue]
  ,[AccountId]
  ,[Active]
  ,[LoggedIn]
  ,[SynchronizeWithLDAP]
  ,[LDAPEntry]
  ,[LDAPEntryId]
  ,[LDAPEntryDN]
  ,[IsDirectoryEntry]
  ,[ProcessListeners]
  ,[SysCultureId]
  ,[LoginAttemptCount])
VALUES
  ('7F3B869F-34F3-4F20-AB4D-7480A5FDF647'
  ,'2008-12-25 10:30:00.0000000'
  ,'22C5540C-D9B1-49EF-8EB7-72419B78E57C'
  ,'2012-09-11 04:52:13.3962744'
  ,'410006E1-CA4E-4502-A9EC-E54D922D2C00'
  ,'Supervisor'
  ,''
  ,NULL
  ,'410006E1-CA4E-4502-A9EC-E54D922D2C00'
  ,''
  ,'eF4f7sfUgBuNFei7bk+3djw/zXkaB1ODf3huR0RJDD4='
  ,4
  ,NULL
  ,1
  ,0
  ,0
  ,''
  ,''
  ,''
  ,0
  ,0
  ,'1A778E3F-0A8E-E111-84A3-00155D054C03'
  ,0)
GO
 
------

Afterwards, distribute the admin and all comapny employees' roles to Supervisor.

Like 0

Like

Share

0 comments
Show all comments

Question

Can I add two member accounts for one contact in SysAdminUnit?

Answer

You cannot implement this case, for bpm'online it is important to support the principle 1 contact = 1 member account in SysAdminUnit.

Like 0

Like

Share

0 comments
Show all comments

Question

Version 7.7.

We modify a page, e.g., of an Account. We add our columns and delete the standard ones.

Afterwards, we want to get back to the default page. For example, we delete the file of the replacing page via configurator. It worked OK in previous versions, all we had to do was to clear the cashe and cookies and recompile everything.

In this version, it does not work. How can we fix it?

Answer

This is connected with using bpm'online bundles starting from version 7.7. The bundles contain all schemas of pages and sections. Simple deleting of a replacing page schema of a section does not change the bundle. To revert to the default page, create an empty replacing client module for the needed page.For example, for the "Leads" section page, it wll look as follows:

define("LeadPageV2", ["BusinessRuleModule", "ConfigurationConstants"],
    function(BusinessRuleModule, ConfigurationConstants) {
        return {};
});

Afterwards, save the created module and clear the browser cache.

Like 0

Like

Share

0 comments
Show all comments

Sypmtom

The folder setup area for mail synchronization is not wide enough to display the folder tree. As a result, the folder names are displayed as a column with one letter only.

Cause

The setup page contains an invisible side panel that was hidden back in version 7.2.0, as a result, only 40% of space is provided for the folder tree. Besides, PageDesignerUtilities styles are applied to the page, which leads to displaying the setup area on half of the page.

Solution

This functionallity was changed completely starting from version 7.7.0, which ensures correct displaying of the folder tree. For versions 7.6.0  and earlier, replace the MailboxFolderSyncSettingsModule module with complete copying of the code, delete styles for the left-container class, add a new style:

#mainContainerEx {
 
     width:  100%;
 
     padding-top:  7px;
 
     margin-right:  40px;
 
}

In the source code, replace Id and the mainContainer selector for the mainContainerEx selector.

Like 0

Like

Share

0 comments
Show all comments

Symptoms

Mail block is not displayed in the communication panel. The console displays the following error message: Uncaught Terrasoft.ItemNotFoundException: Column with the '4684d4ba-4b6b-4d1a-93fb-70ec2afed57f' Id not found in the 'Activity' object

Cause

The EntityConnection table contains connection of an activity with nonexisting or outdated object.

Solution

Execute the following in the configuration or DBMS script, that deletes link to nonexisting column:

DELETE FROM [dbo].[EntityConnection]

WHERE [ColumnUId] = '4684d4ba-4b6b-4d1a-93fb-70ec2afed57f'

Necessary conditions and possible restrictions

Before executing, make sure that no column with such UId exists in the Activity object. It might be contained in one of the packages, but bpm'online may not see it due to the incorrect package dependancy.

Like 0

Like

Share

0 comments
Show all comments

Symptoms

Information is not displayed on the page - all fields are empty.

Cause

User incorrectly deleted a lookup field in the object.

Solution

Correctly create a lookup field with the same name, publish the object, afterwards delete the created object and republish.

Like 0

Like

Share

0 comments
Show all comments