'Bpm'online mobile bug report Type: Terrasoft.ODataItemNotFoundException Message: The Contact element is not found 

Type: Terrasoft.ODataItemNotFoundException 

Message: The Contact element is not found 

Addtional information: 

{"error":{"code":"1","message":{"lang":"","value":"Элемент Contact не найден"},"innererror":{"message":"The Contact element is not found","type":"Terrasoft.Common.ItemNotFoundException","stacktrace":"   at Terrasoft.Core.Entities.Services.EntityLazyProxy.<>c__DisplayClass7.b__6()\r\n   at Terrasoft.Core.Entities.Services.EntityLazyProxy.<>c__DisplayClass2.<.ctor>b__0()\r\n   at System.Lazy`1.CreateValue()\r\n   at System.Lazy`1.LazyInitValue()\r\n   at Terrasoft.Core.Entities.Services.EntityLazyProxy.SaveChanges()\r\n   at Terrasoft.Core.Entities.Services.ServiceContext.SaveChanges()\r\n   at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)\r\n   at System.Data.Services.DataService`1.HandleRequest()"}}}

Cause

An attempt to open a record that has been deleted in the desktop application in a mobile app. 

Solution

To resolve the synchronization issue:

1. Start the synchronization and make sure that the correct date/time of the last synchronization (current date and time) appears in the settings.

2. Clear the cache of the mobile app (click the “Clear cache” button in the settings). If you can't find the button, use the demo login feature first (the demo login button can be found on the authorization screen), and then try clearing the cache again.

3. Start the synchronization again.

Additionally, check if all acess rights are distributed correctly.

Like 0

Like

Share

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

Question

Test email cannot be sent. Even if there are marketing active contacts/ marketing campaigns licenses provided to the Supervisor user.

Whe I try to send an email, the following error occurs: "Method not allowed. Please see the service help page for constructing valid requests to the service".

Cause

The "UnsubscribeApplicationUrl" system setting is missing.

Solution

Execute the following script:

INSERT INTO SysSettingsValue (Id, SysSettingsId, SysAdminUnitId, IsDef)
SELECT N'6A96A15A-34BD-4932-A924-56CC013E3312', Id, N'A29A3BA5-4B0D-DE11-9A51-005056C00008', 1
    FROM SysSettings WHERE Code = 'UnsubscribeApplicationUrl'

 

Like 0

Like

Share

0 comments
Show all comments

Question

How to create a linked column in the mobile app? For example, the "Account" column in the "Contacts" section?

Answer

By default, custom columns (columns created through the mobile application wizard) that have the “Lookup” type in the mobile application are not linked (i.e., it is not possible to access the edit page by clicking on them). For example, the "Cases" section in the mobile app is not included in the base version. To implement this, you need to add a linked field to the mobile application module for the section.

An example implementation can be found in MobileContactModuleConfig ("Contacts" section):

Terrasoft.sdk.RecordPage.configureColumn("Contact", "primaryColumnSet", "Account", {
    viewType: Terrasoft.ViewTypes.Preview
});

 

Like 0

Like

Share

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

Question

How can I add a button in the Communication Panel?

Answer

1. Replace the "CommunicationPanel" module, where the new button will be described.

define("CommunicationPanel", ["terrasoft", "CommunicationPanelHelper"],
	function(Terrasoft, CommunicationPanelHelper) {
		return {
			messages: {
				"SelectCommunicationPanelItem": {
					"mode": Terrasoft.MessageMode.PTP,
					"direction": Terrasoft.MessageDirectionType.SUBSCRIBE
				}
			},
			attributes: {
				"UsrMyMenuActive": {
					"dataValueType": Terrasoft.DataValueType.BOOLEAN,
					"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
					"value": false
				},
				"UsrMyMenuCounter": {
					"dataValueType": Terrasoft.DataValueType.TEXT,
					"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
					"value": ""
				},
				"UsrMyMenuVisible": {
					"dataValueType": Terrasoft.DataValueType.BOOLEAN,
					"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
					"value": true
				}
			},
			methods: {
				getPanelItemConfig: function(moduleName) {
					var config = this.callParent(arguments);
					if (moduleName !== "UsrMyMenuModule") {
						return config;
					}
					return Ext.apply(config, {
						keepAlive: false
					});
				},
				selectItem: function(config) {
					this.set("SelectedMenuItem", config.selectedItem);
				},
				getUsrMyMenuImageConfig: function(itemTag) {
					return this.get("Resources.Images.VisaMenuIcon");
				},
				getUsrMyMenuCaption: function(itemTag) {
					return "test";
				}
			},
			diff: [
				{
					"operation": "insert",
					"index": 0,
					"parentName": "communicationPanelContent",
					"propertyName": "items",
					"name": "usrMyMenu",
					"values": {
						"tag": "UsrMyMenu",
						"visible": {"bindTo": "UsrMyMenuVisible"},
						"imageConfig": {"bindTo": "getUsrMyMenuImageConfig"},
						"caption": {"bindTo": "getUsrMyMenuCaption"},
						"generator": "CommunicationPanelHelper.generateMenuItem"
					}
				}
			]
		};
	});

2. Create the panel module. The module should contain required messages, as in ESNFeedModule:

RerenderModule – subscription, address.

InitModuleViewModel – subscription, address.

	Ext.define("Terrasoft.configuration.UsrMyMenuModule", {
 
		extend: "Terrasoft.BaseSchemaModule",
		alternateClassName: "Terrasoft.UsrMyMenuModule",
 
		generateViewContainerId: false,
 
		initSchemaName: function() {
			this.schemaName = "UsrMyMenu";
		},
 
		initHistoryState: Terrasoft.emptyFn,
 
		init: function() {
			this.callParent(arguments);
			this.initMessages();
		},
 
		initMessages: function() {
			this.sandbox.subscribe("RerenderModule", function(config) {
				if (this.viewModel) {
					this.render(this.Ext.get(config.renderTo));
					return true;
				}
			}, this, [this.sandbox.id]);
		},
 
		createViewModel: function() {
			var viewModel = this.callParent(arguments);
			return viewModel;
		}
 
	});
	return Terrasoft.UsrMyMenuModule;
});

3. Create the page view schema

define("UsrMyMenu", [], function() {
		return {
			mixins: {
			},
			messages: {
			},
			attributes: {
			},
			methods: {
				init: function(callback, scope) {
					this.callParent([function() {
						callback.call(scope);
					}, this]);
				},
				onTestClick: function() {
					alert(1);
				}
			},
			diff: [
				//MyMenu
				{
					"operation": "insert",
					"name": "MyMenu",
					"propertyName": "items",
					"values": {
						"generateId": false,
						"itemType": Terrasoft.ViewItemType.CONTAINER,
						"items": []
					}
				},
				//ShowNewMessagesButton
				{
					"operation": "insert",
					"name": "ShowNewMessagesButton",
					"parentName": "MyMenu",
					"propertyName": "items",
					"values": {
						"generateId": false,
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"caption": "Test!",
						"click": {bindTo: "onTestClick"}
					}
				}
			]
		};
	});

 

Like 1

Like

Share

2 comments

I have tried adding this code but did not got any such button in the communication panel. Can you guide through the way to it?

Siddharth Miglani,

Hello,

We recommend using freedom UI components and the button element: https://academy.creatio.com/docs/8.x/no-code-customization/customization-tools/ui-and-business-logic-customization/element-setup-examples/components/set-up-button-components
You can add a custom button to the page via the OOTB tools without dev tools.

Show all comments

Question

How to quickly generate a page code for a mobile application.

Can be used for:

  • Edit
  • Grid
  • Preview

Answer

Run the following code in the emulator browser console:

(new Terrasoft.CodeGeneration.PageCodeGenerator({
    modelName: "Contact", 
    pageType: Terrasoft.PageTypes.Edit
})).generate()

In modelName, specify the desired object.

In pageType, specify the page type:

pageType: Terrasoft.PageTypes.Grid
pageType: Terrasoft.PageTypes.Edit
pageType: Terrasoft.PageTypes.Preview

The result is:

Terrasoft.LastLoadedPageData = {
    controllerName: "Terrasoft.configuration.ContactEditPageController",
    viewXClass: "Terrasoft.configuration.ContactEditPageView"
};
 
Ext.define("Terrasoft.configuration.view.ContactEditPage", {
    extend: "Terrasoft.view.BaseEditPage",
    alternateClassName: "Terrasoft.configuration.ContactEditPageView",
    config: {
        id: "ContactEditPage"
    }
});
 
Ext.define("Terrasoft.configuration.controller.ContactEditPage", {
    extend: "Terrasoft.controller.BaseEditPage",
    alternateClassName: "Terrasoft.configuration.ContactEditPageController",
    statics: {
        Model: Contact
    },
    config: {
        refs: {
            view: "#ContactEditPage"
        }
    }
});

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms

Bug mobile report:

Type: Terrasoft.SyncException 
Message: Error during synchronization
Stack trace: 

Type: Terrasoft.FileException 
Message: An error occured during the file writing process
AdditionalInfo: Name: BPMonline700/Downloads/6005bfc5-5ea7-42da-82e6-15f5f4c9e80a/invoice for payment #6.pdf

Type: Terrasoft.FileSystemException 
Message: undefined 
AdditionalInfo: Code: undefined 
Data: 4 
Model Name: iPhone8,2 (0x0)
Platform: iOS
Platform Version: 9.2.1
IsOnlineMode: false
UIVersion: 2
ApplicationVersion: 7.7.8
ApplicationMajorVersion: 7.7
ContactId: c41b4784-a414-438c-a846-c5bf418f0056
CultureName: en-US
ApplicationRevision: 0
BackgroundSyncMode: 3
WorkplaceCode: DefaultWorkplace

Cause

This error occurs due to the fact the file on the “Attachments” detail incudes a special character in its name (for example, the "#" symbol) - the iOS platform restricts the use of special characters when sending requests/files.

Solution

Rename the file and remove the “#” symbol. To do this, either:

- find the file and rename it manually;

- Find the parent object in the database using its ID (for example, «6005bfc5-5ea7-42da-82e6-15f5f4c9e80a») and determine its exact location in the application. Either use the database tools to rename it, or rename the located file on the application level. The following script can be used to locate the object in which the file is stored on the database:

-- Incoming parameters - coulmn name and value:
DECLARE @COLUMN_NAME NVarChar(100) = 'Id'
DECLARE @COLUMN_VALUE NVarChar(100) = '6005bfc5-5ea7-42da-82e6-15f5f4c9e80a'
DECLARE @tableName VARCHAR(50)
DECLARE tablesCursor CURSOR LOCAL FORWARD_ONLY STATIC FOR
    -- The request returns the names of the database tables which include the @COLUMN_VALUE column:
    SELECT table_name = sysobjects.name
    FROM sysobjects
    JOIN syscolumns ON sysobjects.id = syscolumns.id         
    WHERE sysobjects.xtype='U'
    and syscolumns.name = @COLUMN_NAME
OPEN tablesCursor
FETCH NEXT FROM tablesCursor INTO @tableName
WHILE @@FETCH_STATUS = 0
BEGIN  
    -- If a table @COLUMN_NAME has a @COLUMN_VALUE value -
    -- display the table name, query, and the number of rows in the EXEC request ('DECLARE @recordCount INT;
        DECLARE @quotesChar CHAR = char(39);
        DECLARE @tabChar CHAR = char(9);
        BEGIN TRY
            SET @recordCount =
                (SELECT COUNT(*)
                FROM [' + @tableName + '] where ' + @COLUMN_NAME + ' = ''' + @COLUMN_VALUE + ''')
                IF @recordCount > 0
                    BEGIN                                                 
                        PRINT ''''
                        PRINT ''-- ' + @tableName + ':''
                        PRINT ''     SELECT * FROM ' + @tableName + ' WHERE ' + @COLUMN_NAME + ' = '' + @quotesChar + ''' + @COLUMN_VALUE + ''' + @quotesChar + ''''                                          
                        PRINT ''     -- Number of rows in request: '' + CAST(@recordCount as VARCHAR(5))
                    END
        END TRY        
        BEGIN CATCH                                   
        END CATCH;                      
    '); FETCH NEXT FROM tablesCursor INTO @tableName END CLOSE tablesCursor DEALLOCATE tablesCursor

 

Like 0

Like

Share

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

Symptoms

"Online help" does not work. The following error is displayed:

The error occurs when, e.g., trying to access Customer Engagement Centre in 7.7., which is now Customer Centre, the document is thus not found.

Cause

The "Product" or "Configuration version" system settings are incorrect.

Solution

Change the "Product" system setting value (write the correct name of the used bpm'online product).

Make sure, that the "Configuration version" system setting has the "7.7.0" version value.

Like 0

Like

Share

0 comments
Show all comments

Question

I have the "Automatic Synchronization - Only through Wifi" enabled in the mobile app. How often does automatic data synchronization occur?

Answer

Each time the application is minimized, it synchronizes after 30 seconds. And if the user activates the application again, the synchronization stops.

Note. Due to the specifics of the iOS operating system, it can stop all processes in the background in about 3 minutes, i.e., if the synchronization did not occur in the background, then it actually did not occur at all. 

Like 0

Like

Share

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

Question

How can I add a button to the detail list for an active string?

Answer

You can implement this as follows:

In the script of a detail, to the diff block, add additional properties to DataGrid (the button name and caption are provided as an example):

{
        "operation": "merge",
        "name": "DataGrid",
        "values": {
                "activeRowAction": {"bindTo": "onActiveRowAction"},
                "activeRowActions": [
                        {
                                "className": "Terrasoft.Button",
                                "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                                "markerValue": "myButtonAction",
                                "tag": "myAction",
                                "caption": "MyButton"
                        }
                ]
        }
}

After this, when you highlight the active string in the detail, a blue button with the "MyButton" caption should appear.

You can add several buttons to the activeRowActions array, they all will be displayed in the highllighted string as you can see it work in the section list.

Afterwards, implement the onActiveRowAction method in the methods of the same detail. This method takes the button tag and the key column value of the highlighted string as arguments. If you need to receive any other values of the highlighted string, you can call the this.getActiveRow() method, which returns the whole model of the highlighted string:

methods: {
        onActiveRowAction: function(buttonTag, primaryColumnValue) {
                if (buttonTag === "myAction") {
                        // the whole code below can be removed, it demonstrates that the
                        // primaryColumnValue and activeRowId values are equal
                        var activeRow = this.getActiveRow();
                        var activeRowId = activeRow.get("Id");
                        console.log(primaryColumnValue);
                        console.log(activeRowId);
                        // your implementation follows here
                        ...
                }
        },
        ...
}

 

Like 1

Like

Share

0 comments
Show all comments

Question

The user creates a visit in the mobile application and syncs. Then removes a visit to the web version of the app.

The user is synchronized in the mobile application, visits are not deleted. User clears the cache - visits are deleted.

Is it possible to synchronize (to delete the records already deleted in the web version) without clearing the cache?

Answer

The mobile application does not implement the termination of deleted records in the desktop application. This is explained by the fact that no logging is performed by default on the server; accordingly, the mobile application does not know that the termination has occurred.

If you want to terminate the records, then you need to enable an additional option in the manifest for the necessary models (for example, the Activity model):

{
   "SyncOptions": {
      "ModelDataImportConfig": [
         {
            "Name": "Activity",
            "IsAdministratedByRights": true
         }
      ]
   }
}

This option adds an additional step to the synchronization, in which the sample of data from the server is selected and compared with the sample of the data in the mobile application.

All "extra" records will be deleted, and the synchronization time might increase (depending on the number of records).

Like 0

Like

Share

0 comments
Show all comments