Sometimes and for no specific reason, i try to save a value for a system settings record but it does not work.

I have created a system settings called X_UserName, i try to save a value or change in its description or even delete it to recreate another one. All of these actions do not work, without any error stated.

I am solving it now by creating a new key with a different name Y_UserName and update the key where i am using it. Any idea what is happening?

Like 0

Like

3 comments

Dear Mortada,

Please open developer tools in your browser (F12 button) and check for errors in the Console tab. In case you are familiar with debugging client side code, you can proceed with finding the reason for such system behavior. Please see the article on client side debugging:

https://academy.bpmonline.com/documents/technic-sdk/7-13/client-code-de…

Also, in case you have done any customization to the SysSettingPageV2, comment out your code, clear browser cache and try editing setting again.

If none of the above will help, please give our support an email, so we could check your system. Email us at support@bpmonline.com

Regards,

Anastasia

Anastasia Botezat,

dear i have already checked f12 and did not see any errors. however i will check if there are any customizations done on that page. 

Anastasia Botezat,

I have also made sure that there are no changes on SysSettingPageV2. I will contact support for this problem. Thanks for your reply.

Show all comments
Question

Hello,

How can we bind the value of the system setting "HasContactMiniPageAddMode" to SVN?

after changing the value to "false", we add data binding for this "SysSettingsValue" where system setting code equals to HasContactMiniPageAddMode we get a warning:

"The record with Id "a0849de9-b4e5-408d-a75c-4551e3e0b9c0" is already bound in the data "SysSettingsValue_ContactMiniPageForAddMod" of package "UIv2" for schema "System setting value"

Like 0

Like

5 comments

Hello ayman,



To achieve it you should set instalation type = Update existing and check column [Forced update]

[Update existing] - when updating a package, only those object columns that are marked with [Required for update ([Forced update]) in the [Columns] group will be updated. This type of installation is used, for example, when delivering hotfix updates!



Best regards,

Alex

Alex_Tim,

 

I still get the warning when saving the data binding with [Update existing] installation method chosen, should this not be the case? I have forced update set on the system setting I'm updating as well. Presumably this warning can be ignored, since the data is bound in another (OOTB) package which won't be installed with my package, but it does seem odd that the warning is still shown.

Hello Harvey, 

 

Could you please specify why do you need to bind the data that is already in one of the base packages?

 

Thank you in advance for your reply!

Olga. 

Hi Olga, in this case it's because I'm binding the default maximum repetitions of Business Processes system setting to the package to a higher number, but in general just to be able to bind any pre-existing System Setting to the package.

Harvey Adcock,

 

Thank you for the clarification! This warning has no impact on data binding. 

 

Best regards,

Olga. 

Show all comments

Hi, 

Based on the previous questions on the same subject in community we have an assumption that calculated fields on Word printables is not supported. 

A workaround would be to have the calculated fields in the entity (Account, Order) itself and compute the values of these calculated fields on certain events with a business process. However, this will result in the business process to be triggered repeatedly just for computation of these calculated fields and may have performance implications.

An alternate would be to compute the values of this printable fields when the user clicks on the Print button, because that is when the computed fields will actually be used. 

Is it possible to override the print button action (in PrintReportUtitlies mixin), and add a custom function call before the printable is processed. If so, can we have details of how to override the "Print" button action?

Regards,

Hatim

Like 0

Like

2 comments

It is possible to create custom macros in C# and use them in Word printables. This might solve your need to do the calculations this way. 

See https://academy.bpmonline.com/documents/technic-sdk/7-13/how-create-mac…

Ryan

Dear Hatim,

Ryan is absolutely right, you can try using custom macros to perform calculations and set the value directly to the printable in case you don't want to use business process for calculations. Also I can add that we have this problem registered on our side regarding automatic calculations and using of formulas in printables and I will inform our R&D team about this community question so to raise the priority of the problem. You can also create a separate object in the database that will store calculated data there and you can use this object in printable so to get calculated data there. Thank you for helping us to make our application better!

Best regards,

Oscar

Show all comments

I created a module that I used to generate a custom  comboBoxEdit  view  (lookup/dropdown) , then I used that module in another page (load the component)  , and the view created successfully but without data.

To be more clear:

1- Code of my Custom Module 

define("UsrDropDownGenerator", ["ext-base", "terrasoft", "sandbox"], function (Ext, Terrasoft, sandbox) {

    Ext.define("Terrasoft.configuration.UsrDropDownGenerator", {

        alternateClassName: "Terrasoft.UsrDropDownGenerator",

        extend: "Terrasoft.BaseModule",

       

        Ext: null,

        sandbox: null,

        Terrasoft: null,

        viewModel: null,

        

        view: null,

      

        init: function () {

            debugger;

            this.callParent(arguments);

            this.initViewModel();

        },

        initViewModel: function () {

           debugger;

            var self = this;

            

            this.viewModel = Ext.create("Terrasoft.BaseViewModel", {

                values: {

                    

                    booleanValueColumnList: Ext.create("Terrasoft.Collection")

                },

                columns: {

                    

                    booleanValueColumnList: {

                        type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                        name: "booleanValueColumnList",

                        isCollection: true,

                    }

                    

                },

                methods: {

                     getColumnList: function (filters, list) {

                         

                         debugger;

                       if (list === null) {

                            return;

                        }

                        list.clear();

                        var columns = {};

                       for (var x = 0; x < 4; x++) 

                          {

                                            

                                var value1 = {

                                displayValue: "qq",

                                value:"1"

            

                              };

                            columns[x] = value1;

                          } 

            

                            list.loadAll(columns);

                            

                    },

                    

                    simpleFilterColumnChange  :function(args){

                        debugger;

                    }

                }

            });

            

        },

        

        render: function (renderTo) {

                 

 // This is executed on the module initialization, right after the init method.

            

              this.view = this.Ext.create("Terrasoft.Container", {

            

                items: [

                    Ext.create("Terrasoft.Container", {

                        renderTo: renderTo,

                    

                        items: [

                            {

                                width: "300px",

                                markerValue: "testMarker",

                                rightIconClasses: ["combobox-edit-right-icon"],

                                className: "Terrasoft.ComboBoxEdit",

                                list: {

                                    bindTo: "booleanValueColumnList"

                                },

                                prepareList: {

                                    bindTo: "getColumnList"

                                },

                                change: {

                                    bindTo: "simpleFilterColumnChange"

                                }

                                

                            }

                            

                        ]

                    })

                ]

            });

            

            

          

            this.view.bind(this.viewModel);

            

            

            return this.view;

        },



       

        destroy: function () {

            

            this.view.destroy();

           

            this.viewModel.destroy();

        }

    });

    debugger;

    

    return Terrasoft.UsrDropDownGenerator;

});

 

2- Code of my page  

......

        methods: {

                             

            onEntityInitialized:function(){

                

                this.callParent(arguments);

                

                var configObj = {

                       data : [{label : "Name" , description:"hh"},{label:"Age" , description : "10"},{label:"Job" , description : "bb"}]

                };

                                      

                this.sandbox.loadModule("UsrDropDownGenerator", {

                        renderTo: "centerPanel", //name of the container where visual module view will be displayed

                        keepAlive: true

                });

                

            },

        

            

        },

 

The dropdown was created successfully and appeared in the page  , but it does not contains any data.

When I click the dropdown ,  the getColumnList() function executed and the data are saved in the list , but no data appear in UI .

Why the data are not filled in the dropdown  , where is the problem in my code?

 

Like 0

Like

1 comments

Hello,



Unfortunately, it`s hard to tell why exactly this code is not applying.



I can recommend you another, easier way to achieve it . If I understood you right, the task is to create dropdown with some values. 

To achieve it you can simply create new object that will store all the data, and add the new lookup field to the page via section wizard.



Also, you can create some custom styles for this field, more about styles can be found here: https://community.bpmonline.com/questions/how-add-custom-style-control-… and here https://community.bpmonline.com/articles/how-add-or-edit-css-style



Best regards,

Alex

 

Show all comments

I need to edit organizational roles and show some additional fields in its page. can we do this by replacing object ? or what is the best approach and how can we do it?

Like 0

Like

1 comments

Dear Ayman,

Unfortunately as for now there is no possibility to change the org.role page with the help of out-of-the-box tools of the application and we do have a correspondent problem registered on our side.

As for now theoretically the only one way to change them is with the help of the replacing object, but we should warn you that it is risky to do, because roles like "All employees" and "System administrators" are used almost everywhere in the application and making some changes to them can lead to some new errors. Actually we don't recommend performing changes to this object, but if you want to try - please use dev-instance or local instance.

Best regards,

Oscar

Show all comments

I am using the Update Query to save an object programmatically. I also created a business process that is triggered when this object is updated.

After updating the object programmatically using Update Query, the process is not triggered.

Is there any methods on the business layer that i can use for this purpose?

Like 0

Like

2 comments

Hello.

The business process cannot be triggered after the direct update in the database. That is done on purpose. You can create another process that would do the update for you, the updates made by the business process trigger other business processes. However, we do not recommend you to do this for large batches of records.

Best regards,

Matt

We used Entity.Save() method and it worked. https://academy.bpmonline.com/api/SDKNETAPI/7.7.0/Terrasoft.Core~Terras…;

 

Show all comments

When I click the detail row , it disappear , and a white background appear , I wonder what is the problem.

Note : I'm  working with a custom detail with list

 

Like 0

Like

2 comments

this is my code

 

define("StFriendAndFamilyNumbersDetail", ["StFriendAndFamilyDetailResources", "ConfigurationGrid", "ConfigurationGridGenerator",

    "ConfigurationGridUtilities", "StServiceViewModel", "css!StServiceDetailCSS"], function (resources) {

    var detailData =[];

    var isAddMode =false;

    var isFirstTime = true;

return {

    entitySchemaName: "StFriendAndFamilyDetail",

    mixins: {

        ConfigurationGridUtilities: "Terrasoft.ConfigurationGridUtilities"

    },

    attributes: {

        "StNameFilter": {

            "dataValueType": Terrasoft.DataValueType.TEXT

        },

        "IsEditable": {

            "dataValueType": Terrasoft.DataValueType.BOOLEAN,

            "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

            "value": false

        },

        "PageNumber": {

            "dataValueType": Terrasoft.DataValueType.INTERGER,

            "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

            "value": 0

        },

        "NumberOfRecords": {

            "dataValueType": Terrasoft.DataValueType.INTERGER,

            "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

            "value": 15

        }

    },

    methods: {

        sortColumn: this.Terrasoft.emptyFn,

        loadGridData: this.Terrasoft.emptyFn,

        loadFilter: function () {

            this.set("PageNumber", 0);

            var gridData = this.getGridData();

            if (gridData) {

                gridData.clear();

                this.set("IsDetailCollapsed", false);

                this.loadSearchItems(

                    this.get("StNameFilter"),

                    this.get("PageNumber"),

                    this.get("NumberOfRecords"),

                    gridData

                );

            }

        },

        loadMore: function () {

            var pageNumber = this.get("PageNumber");

            this.set("PageNumber", ++pageNumber);

            var gridData = this.getGridData();

            if (gridData) {

                this.loadSearchItems(

                    this.get("StNameFilter"),

                    this.get("PageNumber"),

                    this.get("NumberOfRecords"),

                    gridData

                );

            }

        },

        generateActiveRowControlsConfig: function (id, columnsConfig, rowConfig) {

            debugger;

            this.columnsConfig = columnsConfig;

            var gridLayoutItems = [];

            var currentColumnIndex = 0;

            this.Terrasoft.each(columnsConfig, function (columnConfig) {

                var columnName = columnConfig.key[0].name.bindTo;

                var column = this.getColumnByColumnName(columnName);

                var cellConfig = this.getCellControlsConfig(column);

                cellConfig = this.Ext.apply({

                    layout: {

                        colSpan: columnConfig.cols,

                        column: currentColumnIndex,

                        row: 0,

                        rowSpan: 1

                    }

                }, cellConfig);

            /*    if (cellConfig.name === "StServiceParams") {

                    this.set("ComboBoxCollection", new this.Terrasoft.Collection());

                    cellConfig.contentType = Terrasoft.ContentType.ENUM;

                    cellConfig = this.Ext.apply({

                        controlConfig: {

                            list: {

                                bindTo: "ComboBoxCollection"

                            },

                            prepareList: {

                                bindTo: "getComboBoxItems"

                            },

                            change: {

                                bindTo: "ontServiceParamsChange"

                            }

                        }

                    }, cellConfig);

                    cellConfig.enabled = true;

                }

                else {

                    cellConfig.enabled = false;

                }*/

                gridLayoutItems.push(cellConfig);

                currentColumnIndex += columnConfig.cols;

            }, this);

            var gridData = this.getGridData();

            var activeRow = gridData.get(id);

            var options = activeRow.values;

            activeRow.setOptions(options);

            var viewGenerator = this.Ext.create("Terrasoft.ViewGenerator");

            viewGenerator.viewModelClass = { prototype: this };

            var gridLayoutConfig = viewGenerator.generateGridLayout({

                name: this.name,

                items: gridLayoutItems

            });

            console.log(gridLayoutConfig);

            rowConfig.push(gridLayoutConfig);

        },

    

    /*    onSubmitDetail: function () {

            var selectedRows = this.get("SelectedRows");

            if (selectedRows && selectedRows.length > 0) {

                for (var i = 0; i < selectedRows.length; i++) {

                    var selectedItem = this.getGridData().collection.getByKey(selectedRows[i]);

                }

                debugger;

                // TODO selected items processing logic

            }

            else {

                this.showInformationDialog("There isn't any selected item");

            }

        },*/

        init: function (callback, scope) {

            this.set("PageNumber", 0);

            this.callParent([

                function () {

                    var gridData = this.getGridData();

                    if (gridData) {

                        gridData.clear();

                        this.set("IsDetailCollapsed", false);

                        this.loadSearchItems( null, this.get("PageNumber"),

                        this.get("NumberOfRecords"), gridData);

                    }

                    callback.call(scope);

                }, this

            ]);

        

        

            this.sandbox.subscribe("SendDetailData", function (arg) {

                    debugger;

                     detailData = arg.array;

                    this.UpdateRatePlanServices();

                }, this, ["SendDetailDataKey"]);

                

                

            this.sandbox.subscribe("GetDetailData", function (arg) {

                   debugger;

                   var gridData = this.getGridData();

                   var array=[];

        

                if(isFirstTime){

                    

                    isFirstTime=false;

                    

                    for (var i = 0; i < gridData.collection.items.length; i++) {

                           

                           var item = gridData.collection.items[i];

                           var obj={};

                        obj.Id = item.values.StId;

                        obj.PhoneNumber = item.values.StPhoneNumber;

                        obj.ContractId = item.values.StContractId;

                        

                        array.push(obj);

                           

                       }

                       

                    return array;

                    

                }else{

                    

                    return detailData;

                    

                }

                   

                    

           }, this, ["GetDetailDataKey"]);

        

        

        },

        onDetailCollapsedChanged: function () {

            this.callParent(arguments);

            if (!this.get("IsDetailCollapsed")) {

                this.set("PageNumber", 0);

                var gridData = this.getGridData();

                if (gridData) {

                    gridData.clear();

                    this.loadSearchItems( null, this.get("PageNumber"),

                    this.get("NumberOfRecords"), gridData);

                }

            }

        },

        loadSearchItems: function (nameFltr, pageNb, nbOfRecords, gridData) {

    

            debugger;

            var contractId = this.sandbox.publish("GetContractIDMessage", null, ["GetContractIDMessageKey"]);

            

            this.set("MaskId", Terrasoft.Mask.show({ timeout: 0 }));

            this.set("IsGridEmpty", true);

            this.set("IsGridLoading", true);

            this.set("IsGridDataLoaded", false);

            

            if(detailData == null || detailData == "" || detailData == []){

                

                var serviceConfig = {

                    serviceName: "StContractManagerService",

                    methodName: "GetFriendAndFamilyNumbers",

                    timeout: 120000,

                    data: { 

                        contractId: contractId

                    }

                };

                isAddMode = false;

            }else{

                

                var serviceConfig = {

                    serviceName: "StContractManagerService",

                    methodName: "ConstructFriendAndFamilyDetail",

                    timeout: 120000,

                    data: { 

                        array: JSON.stringify(detailData)

                    }

                };

                    isAddMode = true;

            }

            

            this.callService(serviceConfig, function (responseJson) {

                this.set("IsGridLoading", false);

                this.set("IsGridDataLoaded", true);

                if (!this.Ext.isEmpty(responseJson)) {

                    

                        if(!isAddMode){ 

                            var response = this.Ext.decode(responseJson.GetFriendAndFamilyNumbersResult);

                        }else{

                            var response = this.Ext.decode(responseJson.ConstructFriendAndFamilyDetailResult);

                        }

                        

                    if (response.success) {

                            console.log(response);

                        if (response.rowsAffected > 0) {

                            this.set("IsGridEmpty", false);

                            this.set("CanLoadMoreData", response.canShowMore);

                            var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {

                                rootSchemaName: "StFriendAndFamilyDetail",

                                rowViewModelClassName: "Terrasoft.StServiceViewModel"

                            });

                            esq.parseResponse(response, function (result) {

                                if (result.success) {

                                    console.log(result);

                                    var resultCollection = result.collection;

                                    resultCollection.each(function (item) {

                                    item.init(this);

                                    }, this);

                                    gridData.loadAll(result.collection);

                                    this.prepareResponseCollection(resultCollection);

                                    Terrasoft.Mask.hide(this.get("MaskId"));

                                    

                                    

                                }

                                else {

                                    this.showInformationDialog(result.errorInfo);

                                    Terrasoft.Mask.hide(this.get("MaskId"));

                                }

                            }, this);

                        }

                        else {

                            this.set("CanLoadMoreData", false);

                            Terrasoft.Mask.hide(this.get("MaskId"));

                        }

                    }

                    else {

                        this.set("CanLoadMoreData", false);

                        this.showInformationDialog(response.errorInfo.message);

                        Terrasoft.Mask.hide(this.get("MaskId"));

                    }

                }

            }, this);

        },

    

        UpdateRatePlanServices: function(){

            var gridData = this.getGridData();

                    if (gridData) {

                        gridData.clear();

                        this.set("IsDetailCollapsed", false);

                        this.loadSearchItems( null, this.get("PageNumber"),

                        this.get("NumberOfRecords"), gridData);

                    }

            },

    

        

        onActiveRowAction: function (buttonTag,primaryColumnValue) {

                debugger;

                switch (buttonTag) {

                case "someButton":

                //this.onSomeButtonClicked(primaryColumnValue);

                break;

                default:

                break;

                }

        },

                

    },

    messages: {

            "SendDetailData": {

                mode: Terrasoft.MessageMode.PTP,

                direction: Terrasoft.MessageDirectionType.SUBSCRIBE

            },

             "GetDetailData":

             {

                mode: Terrasoft.MessageMode.PTP,

                direction: Terrasoft.MessageDirectionType.SUBSCRIBE

            },

            "GetContractIDMessage": {

                mode: Terrasoft.MessageMode.PTP,

                direction: Terrasoft.MessageDirectionType.PUBLISH

            },

        },

    diff: /**SCHEMA_DIFF*/[

        {

            "operation": "merge",

            "name": "DataGrid",

            "parentName": "Detail",

            "values": {

                "className": "Terrasoft.ConfigurationGrid",

            //    "generator": "ConfigurationGridGenerator.generatePartial",

                "generateControlsConfig": { "bindTo": "generateActiveRowControlsConfig" },

                /*"changeRow": { "bindTo": "changeRow" },*/

                "multiSelect": true

            },

            "index": 0

        },

    {

                "operation": "merge",

                "name": "DataGrid",

                "values": {

                    "activeRowAction": {"bindTo": "onActiveRowAction"},

                    "activeRowActions": []

                    

                }

            },

            {

                "operation": "insert",

                "name": "DataGridActiveRowSomeButton",

                "parentName": "DataGrid",

                "propertyName": "activeRowActions",

                "values": {

                    "className": "Terrasoft.Button",

                    "style": Terrasoft.controls.ButtonEnums.style.GREEN,

                    "caption": "Details",

                    "tag": "someButton"

                }

            },

    

            

    

    ]

    /**SCHEMA_DIFF*/

};

});

 

Hello Mohamad!



To resolve this problem you should debug js client code. Here you can read additional information about debugging client code:

https://academy.bpmonline.com/documents/technic-sdk/7-13/client-code-de… 



If I got this right, method "generateActiveRowControlsConfig" triggers when user clicks on row, so you should pay an extra attention to it.



Best regards,

Alex

Show all comments

Hi, 

I have developed an editable List Grid Detail (derived from BaseGridDetailV2). The detail is added to OrderProductPage.

The entity schema (table) for this detail has the following columns:

  - OrderProductId (Lookup field from OrderProduct table)

  - AssetId (Lookup field from custom asset table)

Assets are linked to Account. The detail is rendered properly however I want to filter the Asset field in the detail based on the opened Order's Account field (Detail screenshot attached). Currently it lists, all the records from the Asset table

Any Ideas on how this can be achieved?

Thank you

 

File attachments
Like 0

Like

3 comments

Hello,

You can add filtering rules on the edit page for the detail and it will be honored in the detail editable list. Edit the page for the detail and add the filtering rule there.

Ryan

How can we do this in FreedomUI? I'm not able to filter lookups shown when inline editing in a grid.

Hi Andres Arrigonni,

 

You can read about the lookup filtering setup here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Have a great day!

Show all comments

Hi, 

What is the difference between Amount and Primary Amount fields in the following tables: 

 - Order

 - OrderProduct

There are some other fields with primary counterparts like (Total, TaxAmount) in OrderProduct and InvoiceProduct tables. I have seen the orders section documentation on Academy but only the "Amount" field is documented. Similarly, what is the rationale of having Quantity and BaseQuantity fields in OrderProduct table?

In addition, is there any Use Case where these fields have a different value. Like Amount and Primary Amount fields with a different value.

Thank you,

Like 0

Like

1 comments

Dear Hatim, 

Regarding to the Primary Amount there is no such column in the base configuration, could you please specify the column name?

Regarding to the Base quantity: when editing product you can add units of measure that indicate the number of pieces in singular product transaction (pieces, packages, etc.) When choosing anything besides pieces you specify the amount of pieces (when choosing pieces the correspondence to the Quantity is 1 to 1). See the first screenshot in attachments. After that when you add product on the detail you specify in which units it would be purchase (See the 2nd screenshot). After adding product Base quantity is updated following the equation Quantity * Pieces in unit and Total is calculated as Base quantity * price (See the 3rd screenshot). When the Quantity is updated the Base quantity gets updated and the Total is recalculated.

https://prnt.sc/lz06nz

https://prnt.sc/lz06y7

https://prnt.sc/lz0735

Here is the example, lets say that I want to ship bottles of water and i want to ship them in packages of 6 bottles. In this case i add unit measure of package in my product and set the number of units in a package to 6. When I add this product on a detail and add packages as unit of measure if i choose to ship 1000 packages the quantity would be 1000, the Base Quantity, however, would be 6000 as I ship 6*1000 bottles in total. The total cost would be calculated based on the Base quantity amount. 



Best regards,

Dennis

Show all comments

Hello,

I created a custom virtual detail and I fill it with data , I have column called 'url' and I want to make its value linkable .

Like 0

Like

2 comments

I made my text controls on the Edit page of a record clickable hyperlinks with the help of this question https://community.bpmonline.com/articles/creating-custom-web-link-field

Show all comments