Question

How can I get back to the standard Contract page? We have accidentaly created a new type via the section wizard, and all settings got cleared. How can I restore them?

We have also deleted all the replacing schemas connected with the contract while trying to "get back to the previous view" and as a result, we cannot open the edit page. We receive the following error message: "Cannot read property 'entitySchemaName' of undefined".

Answer

Delete the schemas (in your case, you have already done that). Perform registration:

delete from SysModuleEdit
where SysModuleEntityId in (select Id from SysModuleEntity
where SysEntitySchemaUId in (select UId from SysSchema where Name = 'Contract'))
GO
declare @RecordId uniqueidentifier = (select NEWID());
insert into SysModuleEdit(Id, SysModuleEntityId, CardSchemaUId, ActionKindCaption, ActionKindName, PageCaption)
values (@RecordId, '11F1B879-BEC8-4E96-82CC-FB6B77CC854D', '948080FC-031E-4D88-9239-47BCEDAA92BC',
'Добавить договор', 'ContractPage', 'Договор')
insert into SysModuleEditLcz(RecordId, ColumnUId, SysCultureId, Value) values
(@RecordId, 'A19BF4BF-E22B-49B5-B6E0-918FF6290020', '1A778E3F-0A8E-E111-84A3-00155D054C03', 'Добавить договор'),
(@RecordId, '55132174-2B96-4E0A-830C-B8E952B12C45', '1A778E3F-0A8E-E111-84A3-00155D054C03', 'Добавить договор')
update SysModule
set Attribute = ''
where SysModuleEntityId in (select Id from SysModuleEntity
where SysEntitySchemaUId in (select UId from SysSchema where Name = 'Contract'))
GO

Restore the edit pages for all custom contract types via the section wizard with specifying their parent in the schemas:Edit page schema of the "Contracts" section.

Like 0

Like

Share

0 comments
Show all comments

Question

How can I get into the local database of a mobile application emulator?

For example, to see what data is exchanged during offline synchronization.

Answer

Physically, the file is here - ... \7.11.7\ChromeUserData\Default\databases\file__0, but you will not be able to open it with custom tools due to encryption. 

There are two options:

Open the console in the browser (after synchrobnization), go to the "Application" tab, expand the list of databases in Web SQL and select the bpm'online database. As a result, you'll be able to write SQL queries and see a list of all tables.

More information can be found in a separate article - https://developers.google.com/web/tools/chrome-devtools/manage-data/loc…

- find an extension for Firefox that can work with SQLlite (you can find it on third-party resources).

Like 0

Like

Share

0 comments
Show all comments

Symptoms

After I have upgraded to version 7.7.0, I get an error when receiving  the number of notifications via execution of the GetUserNotificationCount method (the RemindingsDataService service). The error message is as follows: "Cannot create an instance of Terrasoft.Configuration.BaseNotificationProvider because it is an abstract class."

Cause

The Terrasoft.Configuration.BaseNotificationProvider class name is changed for Terrasoft.Configuration.SystemNotificationProvider in the NotificationProvider table of version 7.7.0. When updating, the modification must be applied via the data setting, but this data is not set in the customer configuration for some reason.

Solution

Perform the following script on the customer base:

UPDATE [NotificationProvider]
SET
[ClassName] = 'Terrasoft.Configuration.SystemNotificationProvider',
[Type] = 2
WHERE [ClassName] = 'Terrasoft.Configuration.BaseNotificationProvider'

Necessary conditions and possible restrictions

If there is no access to the base, perform this script via the configuration.

Like 0

Like

Share

0 comments
Show all comments

This article explains how to bind two different printables together and use one click to print.

Case description:

For example, the first part of the printable should be generated as a word file and the second  printable should be generated as a PDF file. It contains information from the opportunity, which the users are not allowed to change it.

Algorithm of realization:

  1.  We need to bind two printing forms. You should create an object that will contain links to the root printable form, and additional printable.

  2. You should to create and configure two printables or use existing. You should create a lookup for printables binding and bind two printables, which will be printed together.



     
  3. You should create client replacing module for "OpportunityPageV2" and "OpportunitySectionV2" from NUI package 
  4. Insert following code in OportunityPageV2 and OpportunitySectionV2 

    define("OpportunitySectionV2", [], function() {
        return {
            entitySchemaName: "Opportunity",
            methods: {
                generatePrintForm: function(printForm) {
                    this.callParent(arguments);
                    this.generateAdditionalReports(printForm.getTemplateId(), this.getPrintRecordId() || Terrasoft.GUID_EMPTY);
                },
                getAdditionalReportsESQ: function(mainReportId) {
                    var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
                        rootSchemaName: "GlbAdditionalReport"
                    });
                    esq.addColumn("GlbAdditReport.Id", "AdditionalReportId");
                    esq.addColumn("GlbAdditReport.ConvertInPDF", "CToPdf");
                    esq.filters.add("OpportunityFilter", this.Terrasoft.createColumnFilterWithParameter(
                        this.Terrasoft.ComparisonType.EQUAL, "GlbMainReport", mainReportId));
     
                    return esq;
                },
                generateAdditionalReports: function(rootReportId, recordId) {
                    this.showBodyMask();
                    var esq = this.getAdditionalReportsESQ(rootReportId);
                    esq.getEntityCollection(function(result) {
                        if (result.success && result.collection.getCount() > 0) {
                            result.collection.each(function(item) {
                                var data = {
                                    templateId: item.get("AdditionalReportId"),
                                    convertInPDF: item.get("ConvertInPDF"),
                                    recordId: recordId || Terrasoft.GUID_EMPTY
                                };
     
                                var serviceConfig = {
                                    serviceName: "ReportService",
                                    methodName: "CreateReport",
                                    data: data,
                                    timeout: 20 * 60 * 1000
                                };
                                var callback = function(response) {
                                    var key = response.CreateReportResult;
                                    this.downloadReport(item.get("AdditionalReportId"), key);
                                };
                                this.callService(serviceConfig, function(response) {
                                    callback.call(this, response);
                                }, this);
                            }, this);
                        } else {
                            return;
                        }
                    }, this);
                    this.hideBodyMask();
                }
            }
        };
    });



    !!! IMPORTANT. You should allow multiply download files in your browser.

Like 0

Like

Share

4 comments

Does it works?

Dear,

 

The provided code works properly. Please don’t forget to replace the “&&” symbols with “&&” symbols and the “>” symbols with the “>” symbol.

 

Best regards,

Norton

Would it be possible to merge these reports into one big report? instead of multiple downloads?

Gary Singh,

Unfortunately, no. Since the document's structure has to be changed and absolutely new macros created, there is no known way of the printable's auto-creating.

In the described method, we configure two printables, which were manually created with their own connections between macro tags and columns. 

Show all comments

To lock all elements on the page you need to install package GlbPageReadOnlyMode and set up page.

  1. Initialize readOnly mode:

    init: function() {
        this.subscribeReadOnlyEvent({
            excludedDetails: [/*Here add details you want to exclude*/],
            excludedModules: [/*Here add modules you want to exclude*/],
            excludedItems: [/*Here add fields you want to exclude*/]
        });
        this.callParent(arguments);
    }

     

  2. Set up condition to lock a page:

    changeReadOnlyMode: function() {
        if (this.get("Contact")) { // If "Contact" field is filled in, then the page is locked
            this.setPageReadOnlyMode(this, true);
        } else {
            this.setPageReadOnlyMode(this, false);
        }
    }

     

Example: lock page "ContactPageV2" when "Account" field is filled in:

ContactPageV2

define("ContactPageV2", [], function() {
    return {
        entitySchemaName: "Contact",
        methods: {
            init: function() {
                this.subscribeReadOnlyEvent();
                this.callParent(arguments);
            },
            changeReadOnlyMode: function() {
                if (this.get("Account")) {
                    this.setPageReadOnlyMode(this, true);
                } else {
                    this.setPageReadOnlyMode(this, false);
                }
            }
        }
    };
});

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms

In some cases, not all activities, in which the current or selected user is the owner, are displayed in the [Activities] section. Similar situation can be observed on the [Dashboards]  tab of the section.

Cause

The situation occurs, when the owner does not get into the list of participants automatically after the activity is created (manually or according to the process). In the [Activities] section, filtering is performed by this detail: only records whose [Participants] detail contains a user specified as the section "Owner" in the filter are displayed.

Solution

Correct the custom process or the activity creation logic so that the owner is added to the [Participants] detail once created. After this, add the corresponding missing participants by a script. An example of a script:

INSERT INTO [ActivityParticipant]
([Id], [ActivityId], [ParticipantId], [RoleId])
SELECT NewId(), a.[Id], a.[OwnerId], '53fc4a92-b0ea-e111-96c4-00165d094c12'
FROM [Activity] a
WHERE NOT EXISTS (
SELECT ap.[Id] FROM [ActivityParticipant] ap
WHERE ap.[ActivityId] = a.[Id]
AND ap.[ParticipantId] = a.[OwnerId]
)

 

Like 0

Like

Share

0 comments
Show all comments

Symptoms 

Type: Terrasoft.SyncException%0D%0AСообщение: В процессе синхронизации произошла ошибка%0D%0A%0D%0AТип: Terrasoft.ServerException%0D%0AMessage: Request for server returned an erro%0D%0AAdditional information: %0D%0A%09{"request":{"id":6,"headers":{"X-Terrasoft-Mobile":"true","Accept":"application/json","Content-Type":"application/json","Authorization":"Cookie","X-Requested-With":"XMLHttpRequest"},"options":{"url":"http://xxx.xxx.xxx.xxx/0/Services/ProfileService.asmx/Logout","method":"POST","jsonData":{"customData":"","doLogout":"true"},"headers":{"X-Terrasoft-Mobile":"true","Accept":"application/json","Content-Type":"application/json","Authorization":"Cookie"},"disableCaching":false,"scope":{"initialConfig":{"url":"http://xxx.xxx.xxx.xxx/0/Services/ProfileService.asmx/Logout","method":"POST","jsonData":{"customData":"","doLogout":"true"},"headers":{"X-Terrasoft-Mobile":"true","Accept":"application/json","Content-Type":"application/json","Authorization":"Cookie"},"disableCaching":false},"performanceCounter":{"startDate":"2015-06-08T12:11:51.319Z"}}},"async":true},"requestId":6,"status":500,"statusText":"Internal Server Error","responseText":"System.InvalidOperationException: Request format is invalid: application/json.\r\n   at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()\r\n   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()\r\n","responseXML":null,"responseBytes":null}%0D%0A%0D%0A

Cause

A problem in IIS settings.

Solution

Go to the IIS settings - Handler Mappings module

Find the rules for files with * .asmx extension with the following names:

"WebServiceHandlerFactory-Integrated"

"WebServiceHandlerFactory-ISAPI-2.0_32bit"

"WebServiceHandlerFactory-ISAPI-2.0_64bit"

and delete all of them.

Like 0

Like

Share

0 comments
Show all comments

Question

How can I add/change color in the "Color customization" section?

Answer

You can add/change the existing color in the "Color customization" section via the source at all-combined.js (…\Terrasoft.WebApp\Resources\ui\combined\all-combined.js). Use the "colors" property in "ColorMenuItem".

Please note that in this case you can only use the color code, since the application specifies that only "background-color" can be used for this property. You will not be able to insert links to images.

Like 0

Like

Share

0 comments
Show all comments

Question

How to remove the action in the mobile application and how you can sort the actions?

Answer

Approximate algorithm.



1. You need to create your own module (for example,"TestOrderRemoveMobileAccountModuleConfig")

2. To delete an action, use the following method - Terrasoft.sdk.Actions.remove: function (model, actionName)

For example:

Terrasoft.sdk.Actions.remove("Account", "addAccountAnniversary");

3. Use the following code to sort:

Terrasoft.sdk.Actions.setOrder("model ", {
    "actionName1": 0,
    "actionName2": 1,
    …,
    "actionName5": 4
});

For example:

Terrasoft.sdk.Actions.setOrder("Account", {
    "Phone": 0,
    "Email": 1,
    "Meeting": 2,
    "Terrasoft.ActionCopy": 3,
    "Terrasoft.ActionDelete": 4
});
 

4. Then connect it in the user manifest of the mobile application (available on our SDK) in the “Models” section for the “Account” object (if they are accounts) in the “PagesExtensions” section. For example:

 

"Models": {
    "Account": {
        "RequiredModels": [],
        "ModelExtensions": [],
        "PagesExtensions": [
            "TestOrderRemoveMobileAccountModuleConfig"
        ]
    },
 

Where TestOrderRemoveMobileAccountModuleConfig is an arbitrary schema name.

 

You can see the implementation of the add address logic in the MobileAccountModuleConfig schema (the action is called addAccountAddress).

Like 0

Like

Share

0 comments
Show all comments

Question

The styles for twitter and facebook icons are not applied on the [Communication options] detail after I upgrade to a new version

Answer

CommonCSSV2 replacing client module ccontaining custom styles has been found in the configuration. The point is that the base styles have slightly changed and have been added in version 7.6.0, but replacing in the custom package does not let apply these changes.

To eliminate the problem, transfer the styles from the CommonCSSV2 base module to the replacing module and add the custom styles in the end. You can also delete the text from the "Source code" module tab - the styles contained thereon will not be applied.

Like 0

Like

Share

0 comments
Show all comments