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
knowledge base
SDK
support
Q&A

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
knowledge base
SDK
support
Q&A

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
knowledge base
SDK
Q&A
support

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
knowledge base
SDK
support
Q&A

Question

Which IIS settings should be edited to change the session duration? What values are set now?

Answer

Select the "Advanced settings" option on the right part of the window.

Edit the "Connection time-out" value in the settings.

 

Like 0

Like

Share

0 comments
Show all comments
knowledge base
SDK
Q&A
support

Question

How can I pass infromation from ModalBox?

Answer

1) Crreate a MoalBox page - "Model schema of the page view" without specifying the parent schema:

define("UsrMyModalPage", ["ModalBox"], function(ModalBox) {
	return {
		attributes: {
			"TestText": {
				dataValueType: Terrasoft.DataValueType.TEXT,
				type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN
			}
		},
		messages: {
			"DataFromModal": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			}
		},
		methods: {
			init: function(callback, scope) {
				this.callParent(arguments);
			},
			onRender: function() {
			},
			onCloseButtonClick: function() {
				this.sandbox.publish("DataFromModal", { test: this.get("TestText") }, [this.sandbox.id]);
				ModalBox.close();
			}
		},
		diff: [
			{
				"operation": "insert",
				"name": "MyContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyContainer",
				"propertyName": "items",
				"name": "MyGridContainer",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"propertyName": "items",
				"name": "TestText",
				"values": {
					"bindTo": "TestText",
					"caption": "Test text",
					"layout": {"column": 0, "row": 0, "colSpan": 10}
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"name": "CloseButton",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"click": {bindTo: "onCloseButtonClick"},
					"markerValue": "CloseButton",
					"caption": "OK",
					"layout": { "column": 0, "row": 1, "colSpan": 3 }
				}
			}
		]
	};
});

2) Create the ModalBox module - "Module" with a single dependancy from the above mentioned page.

define("UsrMyModalModule", ["ModalBox", "BaseSchemaModuleV2"],
		function(ModalBox) {
	Ext.define("Terrasoft.configuration.UsrMyModalModule", {
		extend: "Terrasoft.BaseSchemaModule",
		alternateClassName: "Terrasoft.UsrMyModalModule",
		/** * @inheritDoc Terrasoft.BaseSchemaModule#generateViewContainerId * @overridden */
		generateViewContainerId: false,
		/** * @inheritDoc Terrasoft.BaseSchemaModule#initSchemaName * @overridden */
		initSchemaName: function() {
			this.schemaName = "UsrMyModalPage";
		},
		/** * @inheritDoc Terrasoft.BaseSchemaModule#initHistoryState * @overridden */
		initHistoryState: Terrasoft.emptyFn,
	});
	return Terrasoft.UsrMyModalModule;
});

3) Create a replacing edit page for adding the created ModalBox:

define("ContactPageV2", ["ContactPageV2Resources", "GeneralDetails", "ModalBox"],
function(resources, GeneralDetails, ModalBox) {
	return {
		entitySchemaName: "Contact",
		messages: {
			"DataFromModal": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		},
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		methods: {
			subscribeSandboxEvents: function() {
				this.callParent(arguments);
				this.sandbox.subscribe("DataFromModal", function(arg) {
					console.log("msg from modal: " + arg.test);
				}, this, [this.sandbox.id + "_" + "UsrMyModalModule"]);
			},
			loadMyModal: function() {
				var sandbox = this.sandbox;
				var config = {
					heightPixels: 420,
					widthPixels: 750
				};
				var moduleName = "UsrMyModalModule";
				var moduleId = sandbox.id + "_" + moduleName;
				var renderTo = ModalBox.show(config, function() {
					sandbox.unloadModule(moduleId, renderTo);
				});
				sandbox.loadModule(moduleName, {
					id: moduleId,
					renderTo: renderTo
				});
			},
			onMyClick: function() {
				this.loadMyModal();
			},
			onEntityInitialized: function() {
				this.callParent(arguments);
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "CombinedModeActionButtonsCardContainer",
				"propertyName": "items",
				"name": "MainContactButton",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": "пыщь-пыщь",
					"click": {"bindTo": "onMyClick"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

 

Like 0

Like

Share

7 comments

Hi do you have example to do the other way around, passing information from contact page to modal box?

Fulgen Ninofranco,

Please find the example below, where on email field change, the modal box will display mobile phone of current contact.

attributes: {
    "Email": {
	dependencies: [
	    {
		columns: ["Email"],
		methodName: "showMobilePhone"
	    }
	]
    }
},
methods: {
    showMobilePhone: function() {
      var mobilePhone = this.get("MobilePhone");
      this.showInformationDialog("Is contact mobile phone " + mobilePhone + " correct?");
    }
}

In case you need to retrieve value for other contact, not the current one, please consider using ESQ i to the Contact object in the method. 

showInformationDialog method can display strings as well as values of localizable strings.

Regards,

Anastasia

S.Kobizka/Anastasia,

I am trying the code in this post to create a modal dialog. I've used the code exactly as posted in this article, without changes, for this test. The ModalBox dialog shows, the client schemas UsrMyModalModule and UsrMyModalPage both load and hit my breakpoint, but the elements in the diff of UsrMyModalPage do not show, the modal dialog is empty. I assume it is possibly because of the type of schema I chose for the UsrMyModalPage. The article says:

Create a MoalBox page - "Model schema of the page view" without specifying the parent schema

What exactly is a "Model schema of the page view". I've tried as a Module, as a "Schema of the Edit Page view Model" (which produces an error about "schema identifier not found" when saving), and also as a Module with "BaseModalBoxPage" as the parent, all with the same results.

Any ideas what I might be doing wrong? Or can you clarify what "Model schema of the page view" is exactly?

Thanks!

Ryan

Ryan Farley,

Hello Ryan,



In order to create a modal box you need:



1. Create a  "Schema of the Edit Page View Model" https://prnt.sc/pxaga3.

Parent object - "Base modal box page schema"  https://prnt.sc/pxagv1

2. Code of the modal box:

define("UsrSampleModalBox", [], function() {
	return {
		attributes: {
			"TestText": {
				dataValueType: Terrasoft.DataValueType.TEXT,
				type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN
			}
		},
		messages: {
		},
		methods: {
			init: function(callback, scope) {
				this.callParent(arguments);
				this.usrInitModuleInfo();
			},
			usrInitModuleInfo: function() {
				var moduleInfo = this.get("moduleInfo");
				this.set("TestText", moduleInfo.TestText);
			},
			getHeader: function() {
				return this.get("Resources.Strings.PageCaption");
			}
		},
		//Insert already existed Iframe
		diff: [
			{
				"operation": "insert",
				"name": "MyContainer",
				"parentName": "CardContentContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyContainer",
				"propertyName": "items",
				"name": "MyGridContainer",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"propertyName": "items",
				"name": "TestText",
				"values": {
					"bindTo": "TestText",
					"caption": "Test text",
					"layout": {"column": 0, "row": 0, "colSpan": 20}
				}
			}
		]
	};
});

3. Call a modal box from the page. I used Account page as an example:

define("AccountPageV2", ["UsrSampleModalBox"], function() {
	return {
		entitySchemaName: "Account",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		methods: {
			getActions: function() {
				var actionMenuItems = this.callParent(arguments);
				this.addModalBoxMenuItem(actionMenuItems);
				return actionMenuItems;
			},
			addModalBoxMenuItem	: function(actionMenuItems) {
				actionMenuItems.addItem(this.getButtonMenuItem({
					"Caption": {"bindTo": "Resources.Strings.ModalBoxMenuItemCaption"},
					"Tag": "openModalBox"
				}));
			},
			openModalBox: function() {
				this.sandbox.loadModule("ModalBoxSchemaModule", {
					id: this.sandbox.id + "_UsrSampleModalBox",
					instanceConfig: {
						moduleInfo: {
							schemaName: "UsrSampleModalBox",
							TestText: "sample parameter value"
						},
						initialSize: {
							width: 800,
							height: 450
						}
					}
				});
			}
		},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

4. Results:

https://prnt.sc/pxai25

https://prnt.sc/pxai8j





Please note, that sample also shows how you can pass parameters and work with them. Parameter  - TestText, and initialSize with size parameters of modal box.

 

 

 

 

Dmytro Smishchenko,

 

Is there any way to pass a callback function to the modal box which can be executed when a button is pressed, e.g. a "save message" button which saves the current record and executes a business process?



Thanks,

Harvey

Hello Harvey, 



Please check this screenshot to see how the ModalBox's "show" method works: 



You can call a callback- function which will be called after closing the modal box in this way:



ModalBox.show(modalBoxConfig, function() { // the code here will work once the box is closed }, this);



Kind regards,

Roman

 

Roman Brown,

 

Thanks Roman, our use case required that we have a different callback for just closing the ModalBox than pressing the button of interest on the ModalBox (a 'save' button) so we ended up slightly modifying the Business Process and calling it from the ModalBox code using the ProcessModuleUtilities module, but will keep this in mind for future.

 

Thanks,

Harvey

Show all comments
SDK
support
cases

Steps to enable Dcm for portal users:

  1. Create replacing objects "SysDcmSettings", "Dcm library (view)", "Section object", "Case status changed actions" and enable access rights by Operations

  2. Add roles "All employees" and "All portal users" to object permissions for the replacing objects from item 1

  3. Add objects from item 1 into lookup "List of objects available for portal users"

  4. Execute sql-script on your environmemnt

    MERGE INTO SysDcmSettings t1 USING (SELECT 1 id) t2 ON (t1.SysModuleEntityId = '355ec546-d278-4d4b-8bf5-a346b4ca3579')
    WHEN NOT MATCHED THEN INSERT (SysModuleEntityId, StageColumnUId, Filters, DefaultSchemaUId)
    VALUES ('355ec546-d278-4d4b-8bf5-a346b4ca3579', 'a71adaea-3464-4dee-bb4f-c7a535450ad7', N'[{"columnUId":null}]', '3c7d3f4f-a553-4717-909e-6ca5dd6a042f');

     

Like 0

Like

Share

0 comments
Show all comments