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

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

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

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

Question

How can I implement tips on the [Connected to] detail?

Answer

The tips for the [Connected to] detail are formed based on the onGetPageTips() method that must be called in the BasePageV2 schema:

To add a custom tip in the [Activities] section, you need to:

  1. replace АctivityPageV2
  2. add localizable string
  3. override the onGetPageTips() method

In the base configuration you can see an example of code in the ContactPageV2 (UIv2) schema:

{
    "operation": "insert",
    "parentName": "Header",
    "propertyName": "items",
    "name": "Owner",
    "values": {
        "layout": {"column": 11, "row": 2, "colSpan": 13},
        "tip": {
            "content": {"bindTo": "Resources.Strings.OwnerTip"}
        }
    }
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

Where can I find information on implementing messages between details via sandbox? 

Answer

Examples of implementing massage exchange between details via sandbox:

1) AccountBillingInfoDetailV2:

define("AccountBillingInfoDetailV2", [], function() {
	return {
		entitySchemaName: "AccountBillingInfo",
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "merge",
				"name": "DataGrid",
				"values": {
					"selectRow": {
						"bindTo": "rowSelected"
					}
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			rowSelected: function() {
				this.sandbox.publish("RowSelectedInFirstDetail", { test: "param anything" }, [this.sandbox.id]);
				console.log("rowSelected in first detail...");
			}
		},
		messages: {
			"RowSelectedInFirstDetail": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			}
		}
	};
});

2) AccountAddressDetailV2:

define("AccountAddressDetailV2", [], function() {
	return {
		entitySchemaName: "AccountAddress",
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			init: function() {
				this.sandbox.subscribe("RowSelectedInFirstDetail", function(arg) {
					console.log("test " + arg.test);
				}, this, [this.getSenderSandboxId()]);
			},
			getSenderSandboxId: function() {
				return this.sandbox.id.replace("_AccountAddress", "_AccountBillingInfo");
			}
		},
		messages: {
			"RowSelectedInFirstDetail": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		}
	};
});

 

Like 0

Like

Share

2 comments

I have an error coming from the arg value:

Unhandled Promise rejection: arg is not defined ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: arg is not defined

 

Where is that coming from? Why do I get it?

Hello Maria,

 

Could you please provide us the full code that you have implemented? Also, as long as I understand this error is being shown in the console. Does it point exactly to this line 

console.log("test " + arg.test); 

?

And what are the steps that you follow to reproduce this problem and receive this error?

 

Best regards,

Dariy

Show all comments

Case

An arbitrary object, say, an account, has parameter 1, parameter 2 and parameter 3. The object has a detail displaying records of this object type, e.g., accounts that meet the condition "parameter 1 + parameter 2 match the primary record", "parameter 2 + parameter 3 match the primary record", "parameter 1 + parameter 3 match the primary record". The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?

Solution

Let's assume we have the following population of the account table:

As per the above description, the page and detail will be populated as follows:

1) The first variant of detial population:

2) The secon variant of detail population. Maybe combining values was meant, in this case the detail and page will be as follows:

"The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?"

If the first variant of detail population was meant, then filterGroup in the filtering method on the page will look as follows:

If the second variant of detail population was meant, then filterGroup in the filtering method on the page will look as follows:

Note the mistake in adding groups - the keys are not specified. The correct adding of groups is displayed below:

filterGroup.add(1”, filterGroup1);
filterGroup.add(2”, filterGroup2);
filterGroup.add(3”, filterGroup3);

 

Like 0

Like

Share

0 comments
Show all comments