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

Question

What database tables should I take to find connection between a Case and permission to its reading?

Answer

Every object has a permission table with the following name structure: Sys + object + Right, (for a case, it is the SySCaseRight name). The permissions are added to such tables with specifying the SySAdminUnitId (a record identifier) of SySAdminUnit (user and group table). The table contains: a RecorId  - the Id of the record that the permission is applied to, Operation - the operation of the permission, and RightLevel - the level of the permission.

SourceId contains the Id from the SysEntitySchemaRecRightSource table, which is the source of permission distribution (Owner, Assignee, Default).

RightLevel values:

      0 - Deny

      1 - CanRead

      2 - CanEdit

Operation values:

      0 - Read

      1 - Edit

      2 - Delete

Like 0

Like

Share

0 comments
Show all comments

Question

How can I display a virtual column lookup field on a page so that the modal selection window works correctly?

Answer

define("ContactAddressPageV2", [],
    function() {
        return {
            attributes: {
                "UsrKladrStreet": {
                    dataValueType: Terrasoft.DataValueType.LOOKUP
                },
                "UsrVirtualKladrStreet": {
                    "dataValueType": Terrasoft.DataValueType.LOOKUP,
                    "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                    isLookup: true,
                    caption: "virtual street",
                    referenceSchemaName: "UsrKladrStreet"
                }
            },
            diff: /**SCHEMA_DIFF*/[
                {
                    "operation": "insert",
                    "parentName": "Header",
                    "propertyName": "items",
                    "name": "UsrKladrStreet",
                    "values": {
                        bindTo: "UsrKladrStreet",
                        "caption": {"bindTo": "Resources.Strings.UsrKladrStreetCaption"},
                        layout: {column: 0, row: 8, colSpan: 12}
                    }
                },
                {
                    "operation": "insert",
                    "parentName": "Header",
                    "propertyName": "items",
                    "name": "UsrVirtualKladrStreet",
                    "values": {
                        bindTo: "UsrVirtualKladrStreet",
                        "caption": "virtual street",
                        layout: {column: 0, row: 9, colSpan: 12}
                    }
                }
            ]/**SCHEMA_DIFF*/
        };
    }
);

 

Like 0

Like

Share

0 comments
Show all comments

Question

Web service without authorization for calling a business process with parameters

Answer

Web service instruction on calling a business process is available at: https://community.bpmonline.com/articles/web-service-available-without-…. The web service is available via HTTP\GET and passes parameters to the business process.

Service:

namespace Terrasoft.Configuration
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    using System.Linq;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using System.Web;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Drawing;
    using System.Globalization;
    using System.Net;
    using System.Text;
    using System.IO;
 
    using Terrasoft.Core;
    using Terrasoft.Core.Configuration;
    using Terrasoft.Core.DB;
    using Terrasoft.Core.Entities;
    using Terrasoft.Core.Process;
    using Terrasoft.Web.Common;
    using Terrasoft.Common;
    using Terrasoft.Common.Json;
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrLaunchProccService : BaseService
    {
        private UserConnection SystemUserConnection {
            get {
                return AppConnection.SystemUserConnection;
            }
        }
 
        public ProcessSchemaManager ProcessSchemaManager {
            get {
                return (ProcessSchemaManager)SystemUserConnection.GetSchemaManager("ProcessSchemaManager");
            }
        }
 
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
        ResponseFormat = WebMessageFormat.Json, UriTemplate = "runUsrTestProcc/{ustTestPhone}/")]
        public string runUsrTestProcc(string ustTestPhone)
        {
            ///////
            var currentWebOperationContext = WebOperationContext.Current;
            var outgoingResponseHeaders = currentWebOperationContext.OutgoingResponse.Headers;
            var incomingRequestOrigin = currentWebOperationContext.IncomingRequest.Headers["Origin"];
            outgoingResponseHeaders.Add("Access-Control-Allow-Origin", incomingRequestOrigin);
            ///////
            var result = "";
            try {
                var UserConnection = this.SystemUserConnection;
 
                var manager = UserConnection.ProcessSchemaManager;
                var processSchema = manager.GetInstanceByName("UsrTestProcc");
                var process = processSchema.CreateProcess(UserConnection);
                if (processSchema.Parameters.ExistsByName("UstTestPhone"))
                {
                process.SetPropertyValue("UstTestPhone", ustTestPhone);
                }
                process.Execute(UserConnection);
                result = "OK for ustTestPhone = " + ustTestPhone;
            } catch (Exception ex) {
                result = ex.Message;
            };
            return result;
        }
 
 
        [OperationContract]
        [WebInvoke(Method = "OPTIONS", UriTemplate = "*")]
        public void GetWebFormLeadDataRequestOptions() {
            var outgoingResponseHeaders = WebOperationContext.Current.OutgoingResponse.Headers;
            outgoingResponseHeaders.Add("Access-Control-Allow-Origin", "*");
            outgoingResponseHeaders.Add("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
            outgoingResponseHeaders.Add("Access-Control-Allow-Headers", "Origin, Content-Type, Accept, X-Requested-With, X-Requested-With, x-request-source");
            outgoingResponseHeaders.Add("Access-Control-Request-Headers", "X-Requested-With, x-request-source, accept, content-type");
        }
    }
}

 

Like 0

Like

Share

0 comments
Show all comments