Symptoms

I wrote a script for autonumbering in InvoicePageV2. It works only for the Zherlygin contact, in the rest of cases the request returns as null.

Profiler data:

Object {value: "b7f3b127-51be-494e-b184-58fe18c0e781", displayValue: "Кривошеева Екатерина", primaryImageValue: "00000000-0000-0000-0000-000000000000"}
 
exec sp_executesql N' SELECT NULL [Id], NULL [UsrInvCounter], NULL [PhotoId], [Photo].[Name] [Photo.Name] FROM [dbo].[SysEmpty] [Contact] WITH(NOLOCK) LEFT OUTER JOIN [dbo].[SysImage] [Photo] WITH(NOLOCK) ON ([Photo].[Id] = [Contact].[Id]) WHERE NULL = @P1',N'@P1 uniqueidentifier',@P1='B7F3B127-51BE-494E-B184-58FE18C0E781'
 
 
 
Object {value: "410006e1-ca4e-4502-a9ec-e54d922d2c00", displayValue: "Жерлыгин Дмитрий", primaryImageValue: "00000000-0000-0000-0000-000000000000"}
 
exec sp_executesql N' SELECT [Contact].[Id] [Id], [Contact].[UsrInvCounter] [UsrInvCounter], [Contact].[PhotoId] [PhotoId], [Photo].[Name] [Photo.Name] FROM [dbo].[Contact] [Contact] WITH(NOLOCK) LEFT OUTER JOIN [dbo].[SysImage] [Photo] WITH(NOLOCK) ON ([Photo].[Id] = [Contact].[PhotoId]) WHERE [Contact].[Id] = @P1',N'@P1 uniqueidentifier',@P1='410006E1-CA4E-4502-A9EC-E54D922D2C00'

Cause

Access permissions for the [Contact] object have been distributed incorrectly.

Solution

Redistribute permissions.

Like 0

Like

Share

0 comments
Show all comments

Question

Can we create a business rule that would process column attribute modifications (e.g., the "required" checkbox) by two collumns?

Answer

Below is an example of a business rule that makes the “UsrRequired” field required for population only in case the "UsrText0" and "UsrText1" fields are unpopulated:

rules: {
    "UsrRequired": {
        BindParameterRequiredAccountByType: {
            ruleType: BusinessRuleModule.enums.RuleType.BINDPARAMETER,
            property: BusinessRuleModule.enums.Property.REQUIRED,
            logical: Terrasoft.LogicalOperatorType.AND,
            conditions: [
                {
                    leftExpression: {
                        type: BusinessRuleModule.enums.ValueType.ATTRIBUTE,
                        attribute: "UsrTest0",
                    },
                    comparisonType: Terrasoft.ComparisonType.EQUAL,
                    rightExpression: {
                        type: BusinessRuleModule.enums.ValueType.CONSTANT,
                        value: ""
                    }
                },
                {
                    leftExpression: {
                        type: BusinessRuleModule.enums.ValueType.ATTRIBUTE,
                        attribute: "UsrTest1",
                    },
                    comparisonType: Terrasoft.ComparisonType.EQUAL,
                    rightExpression: {
                        type: BusinessRuleModule.enums.ValueType.CONSTANT,
                        value: ""
                    }
                }
            ]
        }
    }
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

After I add a web service, I receive the following error: "An item with the same key has already been added"  when trying to log into the configuration.

Answer

The situation might be caused by adding several source code schemas with equal namespace by a user. Delete the added service schemas from SysSchema and recompile the application by resetting:

update SysWorkspace set AssemblyData = null

 

Like 0

Like

Share

0 comments
Show all comments

Question

When selecting Account-Account interconnection, the list of interconnection types is unpopulated. Can it be connected with the fact that we have several Account types with their own pages?

Answer

Bpm'online might not be able to identify the entity to establish the interconnection with - an account or a contact. Consequently, filtering during selection of interconnection types is violated.

Please try verifying the addRelation() method in the BaseRelationshipDetailV2 schema by debugging. Most likely, the problem is in the following string:

var defaultValueColumnName = this.get("CardPageName") === "ContactPageV2" ? "ContactA" : "AccountA";

The defaultValueColumnName variable might receive an incorrect value. If this method (or any other functionality) is overridden in your configuration, it needs additional analysis. Make sure the openCardConfig object receives correct values as a result of method execution (it mainly concerns defaultValues). If this is not the case, override the method in the replacing client module for BaseRelationshipDetailV2 or AccountRelationshipDetailV2 and configure the parameters for a detail edit page correctly.

Like 0

Like

Share

0 comments
Show all comments

Question

When selecting a secton element, bpm'online cannot identify entitySchemaName - the page does not open.

Answer

The problem might be connected with the user profile.Adding or editing a record in section (e.g., adding a column in the tile view) solves the issue.

Like 0

Like

Share

0 comments
Show all comments

Question

We have detected that we can only create bpm'online users for contacts, whose [Account] fields are set to "Our company" value. But taking into consideration the company structure of our customer, we need to add users for contacts, whose account is, say, a subsidiary for "Our company". Can we include such contacts into the list of employees that pops up when adding a user?

Answer

Bpm'online staff logic should not have such restriction, the [Account] field of a contact should be populated, though. Filtering logic for the "Employees" field is set in the "PrepareEmployeeEditFilter" function of the "UserEditPage" page.

You can either edit or disable filtering that restricts contact selection.

Like 0

Like

Share

2 comments

Where can I find the "PrepareEmployeeEditFilter" function or the "UserEditPage" page? 

Hello Elwin,



Could you please elaborate on your business task? 



Best regards,

Bogdan

Show all comments

Symptoms

Some fields are not populated when importing data from Excel. For example, the [Account], [Contact] fields remain unpopulated in leads, and the [Surname], [MiddleName] fields remain empty in contacts.

Cause

The problem can appear in versions 7.6.0.1400 and below, mainly for English localization. But it can also occur in Russion localization, if a user adds object fields with captions that match the names of already existing fields. Basically, this is the core of the issue: an object contains different fields, whose captions match. During import, bpm'online selects the first field and populates it with data. The other field remains unpopulated. A typical example is the "Lead" object in English localization: it contains the "Account name" (Account) field and the "Account" field.

Solution

The simplest way to solve the problem without attracting developers is to change the field captions in the object and the column names in the imported file to avoid matching names as described above.

The other option is upgrading bpm'online to a later version.

Like 0

Like

Share

0 comments
Show all comments

Symptoms

The problem appears when several edit pages are specified for a section that the field refers to. The first edit page opens for any value.

Cause

Incorrect hyperlink as per the field data.

Solution

The problem was fixed in the latest versions of 7.6.0 and starting from 7.7.0. It often happens though, that a customer cannot update to these versions due to different reasons. In this case, we suggest the following solution: create a replacing client module for the BasePageV2 schema and insert the following code therein:

define("BasePageV2", ["terrasoft"], function(Terrasoft) {
	return {
		methods: {
			/** * @inheritdoc Terrasoft.BasePageV2#getEntitySchemaQuery * @overridden */
			getEntitySchemaQuery: function() {
				var esq = this.callParent(arguments);
				this.Terrasoft.each(this.columns, function(column) {
					if ((column.type === Terrasoft.ViewModelColumnType.ENTITY_COLUMN) && column.referenceSchemaName) {
						var referenceSchema = Terrasoft.configuration.EntityStructure[column.referenceSchemaName];
						var attributeValue = referenceSchema && referenceSchema.attribute;
						var columnPath = attributeValue && (column.name + "." + attributeValue);
						if (columnPath && !esq.columns.contains(columnPath)) {
							esq.addColumn(columnPath);
						}
					}
				}, this);
				return esq;
			},
 
			/** * @inheritdoc Terrasoft.BasePageV2#setColumnValues * @overridden */
			setColumnValues: function(entity) {
				this.Terrasoft.each(this.columns, function(column) {
					if ((column.type === Terrasoft.ViewModelColumnType.ENTITY_COLUMN) && column.referenceSchemaName) {
						var columnName = column.name;
						var lookupValue = entity.get(columnName);
						if (!Ext.isEmpty(lookupValue)) {
							var referenceSchema = Terrasoft.configuration.EntityStructure[column.referenceSchemaName];
							var attributeValue = referenceSchema && referenceSchema.attribute;
							var columnPath = attributeValue && (columnName + "." + attributeValue);
							if (columnPath) {
								var entityLookupValue = entity.get(columnPath);
								lookupValue[attributeValue] = entityLookupValue;
								this.set(columnPath, entityLookupValue);
							}
						}
					}
				}, this);
				this.callParent(arguments);
			}
		},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

The necessary conditions and possible restrictions

When updating to versions in which the problem is already fixed, delete the above described replacing from the custom package.

Like 0

Like

Share

0 comments
Show all comments

Problem

There is a field:

{
   "operation": "insert",
   "name": "UsrJob",
   "values": {
      "layout": {"column": 0, "row": 0, "colSpan": 12},
      "bindTo": "UsrJob"
   },
   "parentName": "Header",
   "propertyName": "items"
}

The attribute property contains subscription to the event

"Job": {
   dependencies: [{ 
      columns: ["UsrJob"],
      methodName: "jobChanged"
   }]
}

The jobChanged() method does not receive UsrJob value when the field is changed. The page schema is inherited from BasePageV2.

Cause

The user overrode the method of the onEntityInitialized() parent schema in the created schema as follows:

onEntityInitialized: function() {
   this.set("IsChanged", true);
   if (this.isAddMode()) {
      this.hideBodyMask();
      return;
   }
   var forecastId = (this.isCopyMode())
   ? this.get("SourceEntityPrimaryColumnValue")
   : this.get("Id");
   if (!Ext.isEmpty(forecastId)) {
      var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
      rootSchemaName: "UsrForecastDimension",
      rowCount: 1
   });
   esq.addColumn("Id");
   esq.addColumn("UsrDimension");
   esq.filters.add("ForecastFilter", Terrasoft.createColumnFilterWithParameter(
      Terrasoft.ComparisonType.EQUAL, "UsrForecast", forecastId));
   esq.getEntityCollection(function(response) {
      if (response && response.success) {
         var collection = response.collection;
         if (collection.getCount() > 0) {
            var collectionItems = collection.getItems();
            var dimensionItem = collectionItems[0];
            var dimension = dimensionItem.get("UsrDimension");
            this.set("UsrDimension", dimension);
         }
      }
      this.hideBodyMask();
      }, this);
   }
},

The onEntityInitialized() method of the base schema was not called.

Solution

In the replacing method, add the following string:

this.callParent(arguments);

 

Like 0

Like

Share

0 comments
Show all comments

Problem

I get the "Invalid object name 'dbo.SysAccountLog' " error when I save a record in the [Accounts] section.

Cause

The error was caused by the selected "Update change log" checkbox in the properties of the [Account] replacing object, i.e., the change log was configured incorrectly in this object. 

Solution

Open the replacing object, deselect the "Update change log" checkbox and publish the object. If you need the [Account] object to be logged, set up the corresponding object in the [Change log] section. Learn more at https://academy.bpmonline.com/documents/administration/7-12/change-log-…

Necessary permissions

Admin rights are needed

Like 0

Like

Share

0 comments
Show all comments