Hi All,

 

How to make a data binding for the changing of Section Title across environments.

For Eg,

 



On changing the KnowlegeBase section to FAQ. How to bind this change in the package?

Any thoughts on thiw will really help?



Regards,

Adharsh S

Like 0

Like

3 comments
Best reply

Hi Adharsh,

 

This change is stored in the SysModule table after renaming the section. The column is "Caption" and here is an example from my local machine:

So you will need to bind data from SysModule by the module Id and this change will be transferred with the package.

 

Best regards,

Oscar

Hi Adharsh,

 

This change is stored in the SysModule table after renaming the section. The column is "Caption" and here is an example from my local machine:

So you will need to bind data from SysModule by the module Id and this change will be transferred with the package.

 

Best regards,

Oscar

Oscar Dylan,



Thanks will implement in the same way.



Regards,

Adharsh S

Hi Oleg Drobina,



I did the same thing but I am getting below pasted error. Can you please assist me? 



Error Message :- "Column SysModuleEntity value cannot be obtained because it has not been loaded."

 

Show all comments

Hi,

 

How is it possible to set only the author of the record to be able to delete their record? Beside the roles that are mentioned in the operation permissions, for example System admin.

 

Thanks,

Like 0

Like

3 comments
Best reply

Kavian Abhari,



Yes, you are correct, you can use this.

And if you remove everything from the Record Permissions, by default all rights will be given to the person, who creates the record and System Administrator.

Also, you will need to create a business process to give read/edit rights to all other users as they will not be able to perform these actions using the logic above.

I'm sorry if I misunderstood you, I thought that you do not wish to use Permissions at all.

You can check this article for more information:



https://academy.creatio.com/docs/user/setup_and_administration/user_and…



Best Regards,

Ivanna

Dear Kavian,



If you do not wish to go with Operation Permissions, you can debug onDelete method logic in GridUtilitiesV2 schema.

You need to replace it with your own custom logic.

Unfortunately, your business task can be performed using our base tools.



Best Regards,

Ivanna

Ivanna Yatsura,

Thanks. But not even by using "Record permissions"? 

In the picture below, doesn't it mean that each employee can delete the record that they created?

Kavian Abhari,



Yes, you are correct, you can use this.

And if you remove everything from the Record Permissions, by default all rights will be given to the person, who creates the record and System Administrator.

Also, you will need to create a business process to give read/edit rights to all other users as they will not be able to perform these actions using the logic above.

I'm sorry if I misunderstood you, I thought that you do not wish to use Permissions at all.

You can check this article for more information:



https://academy.creatio.com/docs/user/setup_and_administration/user_and…



Best Regards,

Ivanna

Show all comments

Hi All,



I have a use case to filter the records based on the DateTime filter condition.







This is the value of the above parameter for the filtered record.



You can see that, the above filter condition doesn't meet the values that are listed on the Pre-Configured page.

As a filter result its just compares the Date parameter alone and not the Time parameter.

How to compare the both Date and Time parameter using the Business process elements.



Any inputs on this will be much helpful.



Regards and Thanks,

Adharsh S

Like 0

Like

3 comments

Dear Adharsh,

 

Check if the user has a timezone specified in the timezone profile. This can impact filtration logic. Also on the 1st screenshot, all 4 columns are the same - which result is expected to be shown on screenshot 2? 

 

Best regards,

Angela

Angela Reyes,



Yes, the user has a timezone specified in his timezone profile. The timezone mapped for the user is "GMT". Checked in Database the start and due time are correct shown above. The filtration happens in the same timezone, So the timezone might not affect the filter condition.



The explanation of the above filter conditions,

The use case is to check whether any Activity been created at the given Date time.

New Activity TimePeriod :

Start- 3/26/2021 8.00PM Due - 3/26/2021 9.00PM


Existing Activity TimePeriod :

Start- 3/26/2021 5.00PM  Due - 3/26/2021 7.00PM



So, The new Activity does not fall between the existing Activity.



Explanation of the filter condition :







As you can see, the condition 3 and 4 gets failed. All the conditions are in AND, as a result it should return false and no record should be filtered. But it doesn't do it.



Clarity needed : 1) Does the Business process element of DateTime comparison, whether it will compare the time or it will compare only with date.

2) Is there anyother way to validate this usecase.



Regards,

Adharsh S

 

 

Adharsh,

Thank you for the detailed explanation! Try enabling "consider time in the filter" parameter n element extended properties to fix this behavior.

 

Best regards,

Angela 

Show all comments

Hi,

 

Is it possible to create Data entry compliance for Leads section? Or any of the custom sections?

 

Thanks

Like 0

Like

3 comments
Best reply

HI Kavian,

 

Yes, it's possible. Here are the steps;

 

1) Add a "Completeness" field into your section object. This one should be an integer.

 

2) Add a record about your section into the "Completeness" table. You can do it with the following SQL script:

INSERT INTO Completeness (Name, EntitySchemaName, ResultColumnName, Scale)
    VALUES ('Quotes', 'VistQuotes', 'VistCompleteness', '{"sectorsBounds":{"min":0,"middleFrom":50,"middleTo":80,"max":100}}')

You should specify Name, EntitySchemaName, ResultColumnName and Scale columns.

 

3) Create replacing client module for your page (for example VistQuotes1Page in my case).

 

4) Add dependencies on following schemas: "CompletenessIndicator", "CompletenessMixin", "css!CompletenessCSSV2", "TooltipUtilities".

 

5) Add two attributes into the "attributes" area:

CompletenessValue: {
    dataValueType: Terrasoft.DataValueType.INTEGER,
    value: 0
},
MissingParametersCollection: {
    dataValueType: Terrasoft.DataValueType.COLLECTION
}

6) Add two mixins (CompletenessMixin, TooltipUtilitiesMixin) into your schema.

mixins: {
    CompletenessMixin: "Terrasoft.CompletenessMixin",
    TooltipUtilitiesMixin: "Terrasoft.TooltipUtilities"
},

7) Add the following methods:

methods: {
    init: function() {
        this.set("MissingParametersCollection", this.Ext.create("Terrasoft.BaseViewModelCollection"));
        this.callParent(arguments);
    },
    onDetailChanged: function() {
        this.callParent(arguments);
        this.calculateCompleteness();
    },
    onEntityInitialized: function() {
        this.callParent(arguments);
        if (this.isEditMode()) {
            var collection = this.get("MissingParametersCollection");
            collection.clear();
            this.set("CompletenessValue", 0);
            this.calculateCompleteness();
        }
    },
    onSaved: function() {
        var callParentOnSaved = this.get("CallParentOnSaved");
        this.callParent(arguments);
        if (!callParentOnSaved && !this.isNewMode() && !this.get("IsProcessMode")) {
            this.calculateCompleteness();
        }
    },
    calculateCompleteness: function() {
        var config = {
            recordId: this.get("Id"),
            schemaName: this.entitySchemaName
        };
        this.mixins.CompletenessMixin.getCompleteness.call(this, config, this.calculateCompletenessResponce, this);
    },
    calculateCompletenessResponce: function(completenessResponce) {
        if (this.Ext.isEmpty(completenessResponce)) {
            return;
        }
        var missingParametersCollection = completenessResponce.missingParametersCollection;
        var completeness = completenessResponce.completenessValue;
        var scale = completenessResponce.scale;
        if (!this.Ext.isEmpty(missingParametersCollection)) {
            var collection = this.get("MissingParametersCollection");
            collection.clear();
            collection.loadAll(missingParametersCollection);
        }
        if (this.Ext.isObject(scale) && this.Ext.isArray(scale.sectorsBounds)) {
            this.set("CompletenessSectorsBounds", scale.sectorsBounds);
        }
        if (this.Ext.isNumber(completeness)) {
            this.set("CompletenessValue", completeness);
        }
    }
},

8) Insert completeness bar into your page with code like following:

diff: /**SCHEMA_DIFF*/[
    {
        "operation": "insert",
        "parentName": "MetricsContainer",
        "propertyName": "items",
        "name": "CompletenessContainer",
        "values": {
            "itemType": Terrasoft.ViewItemType.CONTAINER,
            "items": []
        }
    },
    {
        "operation": "insert",
        "parentName": "CompletenessContainer",
        "propertyName": "items",
        "name": "CompletenessValue",
        "values": {
            "generator": "ConfigurationRectProgressBarGenerator.generateProgressBar",
            "controlConfig": {
                "value": {
                    "bindTo": "CompletenessValue"
                },
                "menu": {
                    "items": {
                        "bindTo": "MissingParametersCollection"
                    }
                },
                "sectorsBounds": {
                    "bindTo": "CompletenessSectorsBounds"
                }
            },
            "tips": [],
            "layout": {
                "column": 0,
                "row": 0,
                "rowSpan": 1,
                "colSpan": 1
            }
        }
    },
    {
        "operation": "insert",
        "parentName": "CompletenessValue",
        "propertyName": "tips",
        "name": "CompletenessTip",
        "values": {
            "content": {"bindTo": "Resources.Strings.CompletenessHint"}
        }
    }
]/**SCHEMA_DIFF*/

A full example of code can be found below:

define("VistQuotes1Page", ["CompletenessIndicator", "CompletenessMixin", "css!CompletenessCSSV2", "TooltipUtilities"],
    function() {
    return {
        entitySchemaName: "VistQuotes",
        attributes: {
            CompletenessValue: {
                dataValueType: Terrasoft.DataValueType.INTEGER,
                value: 0
            },
            MissingParametersCollection: {
                dataValueType: Terrasoft.DataValueType.COLLECTION
            }
        },
        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
        methods: {
            init: function() {
                this.set("MissingParametersCollection", this.Ext.create("Terrasoft.BaseViewModelCollection"));
                this.callParent(arguments);
            },
            onDetailChanged: function() {
                this.callParent(arguments);
                this.calculateCompleteness();
            },
            onEntityInitialized: function() {
                this.callParent(arguments);
                if (this.isEditMode()) {
                    var collection = this.get("MissingParametersCollection");
                    collection.clear();
                    this.set("CompletenessValue", 0);
                    this.calculateCompleteness();
                }
            },
            onSaved: function() {
                var callParentOnSaved = this.get("CallParentOnSaved");
                this.callParent(arguments);
                if (!callParentOnSaved && !this.isNewMode() && !this.get("IsProcessMode")) {
                    this.calculateCompleteness();
                }
            },
            calculateCompleteness: function() {
                var config = {
                    recordId: this.get("Id"),
                    schemaName: this.entitySchemaName
                };
                this.mixins.CompletenessMixin.getCompleteness.call(this, config, this.calculateCompletenessResponce, this);
            },
            calculateCompletenessResponce: function(completenessResponce) {
                if (this.Ext.isEmpty(completenessResponce)) {
                    return;
                }
                var missingParametersCollection = completenessResponce.missingParametersCollection;
                var completeness = completenessResponce.completenessValue;
                var scale = completenessResponce.scale;
                if (!this.Ext.isEmpty(missingParametersCollection)) {
                    var collection = this.get("MissingParametersCollection");
                    collection.clear();
                    collection.loadAll(missingParametersCollection);
                }
                if (this.Ext.isObject(scale) && this.Ext.isArray(scale.sectorsBounds)) {
                    this.set("CompletenessSectorsBounds", scale.sectorsBounds);
                }
                if (this.Ext.isNumber(completeness)) {
                    this.set("CompletenessValue", completeness);
                }
            }
        },
        mixins: {
            CompletenessMixin: "Terrasoft.CompletenessMixin",
            TooltipUtilitiesMixin: "Terrasoft.TooltipUtilities"
        },
        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
        diff: /**SCHEMA_DIFF*/[
            {
                "operation": "insert",
                "parentName": "MetricsContainer",
                "propertyName": "items",
                "name": "CompletenessContainer",
                "values": {
                    "itemType": Terrasoft.ViewItemType.CONTAINER,
                    "items": []
                }
            },
            {
                "operation": "insert",
                "parentName": "CompletenessContainer",
                "propertyName": "items",
                "name": "CompletenessValue",
                "values": {
                    "generator": "ConfigurationRectProgressBarGenerator.generateProgressBar",
                    "controlConfig": {
                        "value": {
                            "bindTo": "CompletenessValue"
                        },
                        "menu": {
                            "items": {
                                "bindTo": "MissingParametersCollection"
                            }
                        },
                        "sectorsBounds": {
                            "bindTo": "CompletenessSectorsBounds"
                        }
                    },
                    "tips": [],
                    "layout": {
                        "column": 0,
                        "row": 0,
                        "rowSpan": 1,
                        "colSpan": 1
                    }
                }
            },
            {
                "operation": "insert",
                "parentName": "CompletenessValue",
                "propertyName": "tips",
                "name": "CompletenessTip",
                "values": {
                    "content": {"bindTo": "Resources.Strings.CompletenessHint"}
                }
            },
            {
                "operation": "insert",
                "name": "VistStatusa33f682a-dd58-4739-919d-cb84b9d2fc70",
                "values": {
                    "layout": {
                        "colSpan": 12,
                        "rowSpan": 1,
                        "column": 12,
                        "row": 10,
                        "layoutName": "Header"
                    },
                    "bindTo": "VistStatus",
                    "enabled": true
                },
                "parentName": "Header",
                "propertyName": "items",
                "index": 46
            }
        ]/**SCHEMA_DIFF*/
    };
});

 

Best regards,

Oscar

HI Kavian,

 

Yes, it's possible. Here are the steps;

 

1) Add a "Completeness" field into your section object. This one should be an integer.

 

2) Add a record about your section into the "Completeness" table. You can do it with the following SQL script:

INSERT INTO Completeness (Name, EntitySchemaName, ResultColumnName, Scale)
    VALUES ('Quotes', 'VistQuotes', 'VistCompleteness', '{"sectorsBounds":{"min":0,"middleFrom":50,"middleTo":80,"max":100}}')

You should specify Name, EntitySchemaName, ResultColumnName and Scale columns.

 

3) Create replacing client module for your page (for example VistQuotes1Page in my case).

 

4) Add dependencies on following schemas: "CompletenessIndicator", "CompletenessMixin", "css!CompletenessCSSV2", "TooltipUtilities".

 

5) Add two attributes into the "attributes" area:

CompletenessValue: {
    dataValueType: Terrasoft.DataValueType.INTEGER,
    value: 0
},
MissingParametersCollection: {
    dataValueType: Terrasoft.DataValueType.COLLECTION
}

6) Add two mixins (CompletenessMixin, TooltipUtilitiesMixin) into your schema.

mixins: {
    CompletenessMixin: "Terrasoft.CompletenessMixin",
    TooltipUtilitiesMixin: "Terrasoft.TooltipUtilities"
},

7) Add the following methods:

methods: {
    init: function() {
        this.set("MissingParametersCollection", this.Ext.create("Terrasoft.BaseViewModelCollection"));
        this.callParent(arguments);
    },
    onDetailChanged: function() {
        this.callParent(arguments);
        this.calculateCompleteness();
    },
    onEntityInitialized: function() {
        this.callParent(arguments);
        if (this.isEditMode()) {
            var collection = this.get("MissingParametersCollection");
            collection.clear();
            this.set("CompletenessValue", 0);
            this.calculateCompleteness();
        }
    },
    onSaved: function() {
        var callParentOnSaved = this.get("CallParentOnSaved");
        this.callParent(arguments);
        if (!callParentOnSaved && !this.isNewMode() && !this.get("IsProcessMode")) {
            this.calculateCompleteness();
        }
    },
    calculateCompleteness: function() {
        var config = {
            recordId: this.get("Id"),
            schemaName: this.entitySchemaName
        };
        this.mixins.CompletenessMixin.getCompleteness.call(this, config, this.calculateCompletenessResponce, this);
    },
    calculateCompletenessResponce: function(completenessResponce) {
        if (this.Ext.isEmpty(completenessResponce)) {
            return;
        }
        var missingParametersCollection = completenessResponce.missingParametersCollection;
        var completeness = completenessResponce.completenessValue;
        var scale = completenessResponce.scale;
        if (!this.Ext.isEmpty(missingParametersCollection)) {
            var collection = this.get("MissingParametersCollection");
            collection.clear();
            collection.loadAll(missingParametersCollection);
        }
        if (this.Ext.isObject(scale) && this.Ext.isArray(scale.sectorsBounds)) {
            this.set("CompletenessSectorsBounds", scale.sectorsBounds);
        }
        if (this.Ext.isNumber(completeness)) {
            this.set("CompletenessValue", completeness);
        }
    }
},

8) Insert completeness bar into your page with code like following:

diff: /**SCHEMA_DIFF*/[
    {
        "operation": "insert",
        "parentName": "MetricsContainer",
        "propertyName": "items",
        "name": "CompletenessContainer",
        "values": {
            "itemType": Terrasoft.ViewItemType.CONTAINER,
            "items": []
        }
    },
    {
        "operation": "insert",
        "parentName": "CompletenessContainer",
        "propertyName": "items",
        "name": "CompletenessValue",
        "values": {
            "generator": "ConfigurationRectProgressBarGenerator.generateProgressBar",
            "controlConfig": {
                "value": {
                    "bindTo": "CompletenessValue"
                },
                "menu": {
                    "items": {
                        "bindTo": "MissingParametersCollection"
                    }
                },
                "sectorsBounds": {
                    "bindTo": "CompletenessSectorsBounds"
                }
            },
            "tips": [],
            "layout": {
                "column": 0,
                "row": 0,
                "rowSpan": 1,
                "colSpan": 1
            }
        }
    },
    {
        "operation": "insert",
        "parentName": "CompletenessValue",
        "propertyName": "tips",
        "name": "CompletenessTip",
        "values": {
            "content": {"bindTo": "Resources.Strings.CompletenessHint"}
        }
    }
]/**SCHEMA_DIFF*/

A full example of code can be found below:

define("VistQuotes1Page", ["CompletenessIndicator", "CompletenessMixin", "css!CompletenessCSSV2", "TooltipUtilities"],
    function() {
    return {
        entitySchemaName: "VistQuotes",
        attributes: {
            CompletenessValue: {
                dataValueType: Terrasoft.DataValueType.INTEGER,
                value: 0
            },
            MissingParametersCollection: {
                dataValueType: Terrasoft.DataValueType.COLLECTION
            }
        },
        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
        methods: {
            init: function() {
                this.set("MissingParametersCollection", this.Ext.create("Terrasoft.BaseViewModelCollection"));
                this.callParent(arguments);
            },
            onDetailChanged: function() {
                this.callParent(arguments);
                this.calculateCompleteness();
            },
            onEntityInitialized: function() {
                this.callParent(arguments);
                if (this.isEditMode()) {
                    var collection = this.get("MissingParametersCollection");
                    collection.clear();
                    this.set("CompletenessValue", 0);
                    this.calculateCompleteness();
                }
            },
            onSaved: function() {
                var callParentOnSaved = this.get("CallParentOnSaved");
                this.callParent(arguments);
                if (!callParentOnSaved && !this.isNewMode() && !this.get("IsProcessMode")) {
                    this.calculateCompleteness();
                }
            },
            calculateCompleteness: function() {
                var config = {
                    recordId: this.get("Id"),
                    schemaName: this.entitySchemaName
                };
                this.mixins.CompletenessMixin.getCompleteness.call(this, config, this.calculateCompletenessResponce, this);
            },
            calculateCompletenessResponce: function(completenessResponce) {
                if (this.Ext.isEmpty(completenessResponce)) {
                    return;
                }
                var missingParametersCollection = completenessResponce.missingParametersCollection;
                var completeness = completenessResponce.completenessValue;
                var scale = completenessResponce.scale;
                if (!this.Ext.isEmpty(missingParametersCollection)) {
                    var collection = this.get("MissingParametersCollection");
                    collection.clear();
                    collection.loadAll(missingParametersCollection);
                }
                if (this.Ext.isObject(scale) && this.Ext.isArray(scale.sectorsBounds)) {
                    this.set("CompletenessSectorsBounds", scale.sectorsBounds);
                }
                if (this.Ext.isNumber(completeness)) {
                    this.set("CompletenessValue", completeness);
                }
            }
        },
        mixins: {
            CompletenessMixin: "Terrasoft.CompletenessMixin",
            TooltipUtilitiesMixin: "Terrasoft.TooltipUtilities"
        },
        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
        diff: /**SCHEMA_DIFF*/[
            {
                "operation": "insert",
                "parentName": "MetricsContainer",
                "propertyName": "items",
                "name": "CompletenessContainer",
                "values": {
                    "itemType": Terrasoft.ViewItemType.CONTAINER,
                    "items": []
                }
            },
            {
                "operation": "insert",
                "parentName": "CompletenessContainer",
                "propertyName": "items",
                "name": "CompletenessValue",
                "values": {
                    "generator": "ConfigurationRectProgressBarGenerator.generateProgressBar",
                    "controlConfig": {
                        "value": {
                            "bindTo": "CompletenessValue"
                        },
                        "menu": {
                            "items": {
                                "bindTo": "MissingParametersCollection"
                            }
                        },
                        "sectorsBounds": {
                            "bindTo": "CompletenessSectorsBounds"
                        }
                    },
                    "tips": [],
                    "layout": {
                        "column": 0,
                        "row": 0,
                        "rowSpan": 1,
                        "colSpan": 1
                    }
                }
            },
            {
                "operation": "insert",
                "parentName": "CompletenessValue",
                "propertyName": "tips",
                "name": "CompletenessTip",
                "values": {
                    "content": {"bindTo": "Resources.Strings.CompletenessHint"}
                }
            },
            {
                "operation": "insert",
                "name": "VistStatusa33f682a-dd58-4739-919d-cb84b9d2fc70",
                "values": {
                    "layout": {
                        "colSpan": 12,
                        "rowSpan": 1,
                        "column": 12,
                        "row": 10,
                        "layoutName": "Header"
                    },
                    "bindTo": "VistStatus",
                    "enabled": true
                },
                "parentName": "Header",
                "propertyName": "items",
                "index": 46
            }
        ]/**SCHEMA_DIFF*/
    };
});

 

Best regards,

Oscar

Oscar Dylan,

Thanks, is it possible to define negative values? For example, if Lead Contact unsubscribe from a Marketing Campaign, a boolean would be triggered and therefore it will reset the data entry compliance to 0.

 

Thanks,

Hi Kavian Abhari,



Please try to use this code.

 



onEntityInitialized: function() {

      var IsUnsubscribed = true;

        this.callParent(arguments);

        if (this.isEditMode()) {

            var collection = this.get("MissingParametersCollection");

            collection.clear();

          this.set("CompletenessValue", 0);

          if(this.get("IsUnsubscribed") == true){

          return;

          } else

          this.calculateCompleteness();

        }

    },





P.S. "IsUnsubscribed" - this is my example of your boolean variable that sets the unsubscribe logic.



Best Regards, 



Bogdan L.

Show all comments

Dear Community,

 

We have a status lookup in a section edit page. If the value of the look up becomes "Queued" , the INFORMATION_BUTTON must appear. Any other status must make not make the button visible.

 

I have the following code to insert this INFORMATION_BUTTON in Diff array

    {

                "operation": "insert",

                "name": "QueuedInfoChat",

                "values": {

                    "layout": {

                        "colSpan": 7,

                        "rowSpan": 1,

                        "column": 2,

                        "row": 1,

                        "layoutName": "Header"

                    },

                    "itemType": Terrasoft.ViewItemType.INFORMATION_BUTTON,

                    "content": {

                        "bindTo": "Resources.Strings.QueuedStatusChat"

                    },

                    "visible": {

                        "bindTo": "QueuedToolTipChat"

                    }

                },

                "parentName": "Header",

                "propertyName": "items",

                "index": 8

            }

And the attribute

"QueuedToolTipChat": {

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": true

            }

When I tried setting this attribute to false, the button is still visible. Please see image attached for reference

Any suggestion would help.

 

Thanks in Advance!

Like 0

Like

2 comments

Hello Shivani,

 

"visible" parameter doesn't work for the INFORMATION_BUTTON item type, but I found a workaround. This function was called in the onEntityInitializedFunction:

          	onEntityInitialized: function(){
				this.callParent(arguments);
              	this.checkCondition();
            },

and

checkCondition: function(){
			if (this.get("Name")=="123 2"){
				document.getElementById("ContactPageV2SimpleInfoButtonButton-imageEl").style.display = "none";
            } else {
			return;
            }
          },

where ContactPageV2SimpleInfoButtonButton-imageEl was received from the HTML of the page (this particular Id remains static on the contact page for all contact records):

As a result button successfully disappears in case the name of a contact is "123 2" so you can test the following code on your side.

 

Best regards,

Oscar

Oscar Dylan,

Thank you for your response Oscar. We were able to achieve this through another way as well. Adding the snippet for those who might need it.

The following code is added to Diff array where Resources.Images.QueueInfo - QueueInfo is an image added

{

                "operation": "insert",

                "name": "QueuedInfoChat",

                "values": {

                    "layout": {

                        "colSpan": 2,

                        "rowSpan": 1,

                        "column": 8,

                        "row": 1

                    },

                    "itemType": 5,

                    "hint": {

                        "bindTo": "Resources.Strings.QueuedStatusChat"

                    },

                    "tips": [],

                    "canExecute": {

                        "bindTo": "canBeDestroyed"

                    },

                    "imageConfig": {

                        "bindTo": "Resources.Images.QueueInfo"

                    },

                    "markerValue": "Update-button-QueuedInfoChat",

                    "tag": "Update-button-QueuedInfoChat",

                    "visible": {

                        "bindTo": "QueuedChatVisibility"

                    }

                },

                "parentName": "Header",

                "propertyName": "items",

                "index": 5

            }

The following is added to attributes

"QueuedChatVisibility": {

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "value": false

            }

 

Last piece is the method that checks the status. This method is called in onEntityInitialized function

 

    checkChatStatus :function()

            {

                var chatStatus="";

                

                try 

                    {

                        chatStatus = this.get("UsrChatStatus").displayValue;

                    }

                 catch (e) {

                     this.console.log("Chat status not set");

                    

                }

            

                if(chatStatus!==undefined && chatStatus!=="")

                {

                    if(chatStatus==="Queued")

                    {

                        this.set("QueuedChatVisibility",true);

                        this.console.log("Setting tooltip chat true");

                        return true;

                    }

                }

                this.set("QueuedChatVisibility",false);

                this.console.log("setting chat to false");

                return true;

            }

 

Thanks again!

 

Show all comments

Hi Community,

 

A regular user in Creatio can change his/her password using the my profile section as shown below

 

How to restrict user not to change his her password using this.

 

Many thanks!

Like 0

Like

1 comments

Hi Team

 

I'd like to create a custom page like the Email Template Content Builder and open it in a new window.

The actual EmailContentBuilder implementation uses BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/MultiLanguageEmailContentBuilder to open the new Module in a new window.

 

How does this work? and how can I build a similar behavior?

 

Thank you

Mohamed

 

Like 0

Like

3 comments

Hello Mohamed,

 

To open page in a separate window use:



window.open(youePageUrl);



MultiLanguageEmailContentBuilder code can be found in EmailTemplate package and used as a reference.

 

Best regards,

Bogdan S.

Bogdan Spasibov,

 

Thanks for the reply.

 

The MultiLanguageEmailContentBuilder module inherit from ContentBuilder schema (the ContentBuilder doesn't have a parent object).

And I have successfully opened the ContentBuilder page in a new window using:

window.open('BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/ContentBuilder').



Now, I copied the ContentBuilder module into MyCustomBuilder.

When I open MyCustomBuilder I got this message:

 

require.js:168 Uncaught Error: Script error for "MyCustomBuilderStructure"

http://requirejs.org/docs/errors.html#scripterror

    at makeError (require.js:168)

    at HTMLScriptElement.onScriptError (require.js:1744)

 

Any Help! 

 

Thank you

Mohamed



 

Mohamed Ouederni,

 

Hello,

 

The link you've specified in the very first post is not a complete link that is opened upon clicking the "Edit" button of the template wizard. Here is an example of the complete link: BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/MultiLanguageEmailContentBuilder/8f5c1959-25e0-45bc-a62d-04b516502a82/EmailTemplate/Body.

 

In your case the system cannot process the bold text part and returns an error since which template should the system open when calling MyCustomBuilderStructure?

 

It's better to:

 

1) Replace the MultiLanguageEmailContentBuilder and deploy your own logic there or

2) Use some existing section and edit page to call it when clicking the button so the system could open something (but you need to develop additional logic of the URL creation that could open a correct record when clicking a button).

 

Uncaught Error: Script error for "MyCustomBuilderStructure" won't provide us with much information where the actual problem is, please use one of two ways I mentioned above to achieve your business task.

 

Best regards,

Oscar

Show all comments

I am trying to set up the machine learning services for an on-premise instance of Creatio, I followed the steps listed here



https://academy.creatio.com/docs/user/setup_and_administration/on-site_deployment/machine_learning_service



Even though the container and the instance are on the physical machine hosted locally, Creatio is asking for CloudServiceApiKey. Is there a dependence on Creatio cloud even for an on-premise installation of the ML service? Any help in this regard is greatly appreciated! Thanks in advance...

Like 1

Like

3 comments

Hello,

 

The on-premise application requires an API key as well since it is used by the service itself. It should be requested separately for each instance. 



Best regards,

Angela

Angela Reyes,

Thanks for the reply! We were also trying to setup the ML service on-premise following the documentation. Is there still need for a cloud service API?

 

 

amanthena,

Yes, it is required for on-premise applications. You can contact Creatio support to order the key. 

 

Best regards,

Angela

Show all comments

Hello community,

 

We have a use case where some business logic has been implemented as a business process and the output of it is set to 2 business process parameters. We need to trigger this BP from source code and read the output parameters after execution of the process. The execution part is straight forward. The reading of parameters is not. 

 

I went through various articles/questions on the community related to these. But most of them only talk about executing a process by setting parameters and not reading parameters after execution. Request some assistance.



I also went through the IProcessExecutor documentation here and it permits to retrieve one result parameter. What if I need to read more than 1 parameter at the end of the business process execution?? Is there any other way to execute a BP from server side code and get the output parameter?



Note - I am aware that the Business process can be executed via a Http call to the ProcessEngineService and output parameters retrieved via the ResultParameterName query parameter. This is not a viable option for us. Additionally, it only permits one ResultParameterName and not reading multiple business process parameters.

Like 0

Like

2 comments
Best reply

Hello,

 

You can use this example to receive parameters: 

// getting UserConnectionUserConnection userConnection = GetUserConnection();
// getting  IProcessExecutor
IProcessExecutor processExecutor = userConnection.ProcessEngine.ProcessExecutor;
// List of input parameters
var inputParameters = new Dictionary<string, string> {
    ["ProcessSchemaParameter1"] = "Value1",
    ["ProcessSchemaParameter2"] = "Value2"
};
//  List of output parameters
var resultParameterNames = new string[] {
    "ProcessSchemaParameter3",
    "ProcessSchemaParameter4"
};
string processSchemaName = "processSchemaName";
Guid processSchemaUId = Guid.Parse("00000000-0000-0000-0000-000000000000");
 
// Run the process by schema name and forwarding output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaName, resultParameterNames);
// Run the process by schema UId and forwarding output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaUId, resultParameterNames);
 
//  Run the process by schema name with forwarding input and output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaName, inputParameters, resultParameterNames);
// Run the process by schema UId with forwarding input and output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaUId, inputParameters, resultParameterNames);

You can also get values of the resulting parameters by accessing the ResultParameterValues property of the IReadOnlyDictionary <string, object> type of the ProcessDescriptor class: 

ProcessDescriptor processDescriptor = processExecutor.Execute("processSchemaName", inputParameters, resultParameterNames);
object parameter3Value = processDescriptor.ResultParameterValues["ProcessSchemaParameter3"];
if (processDescriptor.ResultParameterValues.TryGetValue("ProcessSchemaParameter4", out object parameter4value)) {
    Console.Log(parameter4value);
}

Please note that such process will always be run in not-background mode and you will be able to receive several parameters only from version 7.17.1. 

 

Best regards,

Angela

Hello,

 

You can use this example to receive parameters: 

// getting UserConnectionUserConnection userConnection = GetUserConnection();
// getting  IProcessExecutor
IProcessExecutor processExecutor = userConnection.ProcessEngine.ProcessExecutor;
// List of input parameters
var inputParameters = new Dictionary&lt;string, string&gt; {
    ["ProcessSchemaParameter1"] = "Value1",
    ["ProcessSchemaParameter2"] = "Value2"
};
//  List of output parameters
var resultParameterNames = new string[] {
    "ProcessSchemaParameter3",
    "ProcessSchemaParameter4"
};
string processSchemaName = "processSchemaName";
Guid processSchemaUId = Guid.Parse("00000000-0000-0000-0000-000000000000");
 
// Run the process by schema name and forwarding output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaName, resultParameterNames);
// Run the process by schema UId and forwarding output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaUId, resultParameterNames);
 
//  Run the process by schema name with forwarding input and output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaName, inputParameters, resultParameterNames);
// Run the process by schema UId with forwarding input and output parameters
ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaUId, inputParameters, resultParameterNames);

You can also get values of the resulting parameters by accessing the ResultParameterValues property of the IReadOnlyDictionary <string, object> type of the ProcessDescriptor class: 

ProcessDescriptor processDescriptor = processExecutor.Execute("processSchemaName", inputParameters, resultParameterNames);
object parameter3Value = processDescriptor.ResultParameterValues["ProcessSchemaParameter3"];
if (processDescriptor.ResultParameterValues.TryGetValue("ProcessSchemaParameter4", out object parameter4value)) {
    Console.Log(parameter4value);
}

Please note that such process will always be run in not-background mode and you will be able to receive several parameters only from version 7.17.1. 

 

Best regards,

Angela

Angela Reyes,

Thank you Angela for the inputs

Show all comments

Dear Community, 

 

As per the link : https://community.creatio.com/questions/sort-detail-page-load

we implemented sorting by date time when the detail loads the first time. 

Method 1 

addGridDataColumns: function(esq) {
	this.callParent(arguments);
 
	// add sorting column
	var ModifiedOnColumn = esq.addColumn("ModifiedOn", "ModifiedOn");
	ModifiedOnColumn.orderPosition = 0;
	ModifiedOnColumn.orderDirection = Terrasoft.OrderDirection.DESC;
}

Method 2 : 

getGridDataColumns: function() {

                var gridDataColumns =  {

                    "ModifiedOn": {path: "ModifiedOn", orderPosition = 0

                    orderDirection: Terrasoft.OrderDirection.DESC}

                    }; 

                return gridDataColumns;

            }

Observations : if orderposition is mentioned, manual sort by user does not happen.

Removing order position and implementing any of the above methods, sorts the records, but once user does a manual sort, say by Name, the next time user logs in, the detail records are sorted by Name and not by the default sort condition "ModifiedOn"

 

Is there a way to enforce sort when user logs in and also allow manual sort by user?

 

Thanks in advance!

Like 0

Like

7 comments

Hello Shivani,

 

It happens since the sorting state for detail is saved in the SysProfileData table and each time a user opens a detail the correspondent sorting state is taken from the SysProfileData table.

 

You need to create a trigger in the system that could automatically remove a record about detail records sorting order in the SysProfileData table upon each login to the application.

 

To find a needed record you need to use two key points:

 

1) Use the "ContactId" column value to find records for some particular system user (references a contact of a system user)

2) Use the "Key" column and put the name of a detail

 

Here is an example of a query:

 

select * from SysProfileData where [Key] like '%Schema0bbbd1fe%' and ContactId in (select ContactId from SysAdminUnit where Name = 'input the name of a system user')

What you need to do is to drop a record found by the query, but upon each login to the system. For this purpose you can create a trigger that will be triggered upon changing the "LoggedIn" column value from the "SysAdminUnit" table.

 

Best regards,

Oscar

Oscar Dylan,

Thank you for your response, Oscar!

Oscar Dylan,

Hi Oscar. Is there a way to disable this 'Sort order memory' either at a detail level or user level or application level? What if users did not want their sort order to be remembered and pre-loaded?

M Shrikanth,

 

Hello,

 

In this case you will need to study the BaseDataView and check a particular place in the schema where UserProfile request is generated upon modifying the sorting order of a detail column and override the method where it happens so not to save the UserProfile state.

 

Best regards,

Oscar

Oscar Dylan,

 I understand Oscar. It would be laborious to identify all such details and override sending of the UserProfile request. I was looking at a master switch which will toggle whether this sort order is 'remembered' or not. I infer that such a feature is not available as of now

M Shrikanth,

 

No there is no such a toggle or a setting or a feature. This is all the logic in the BaseDataView that needs to be overridden in case it's not needed.

 

Best regards,

Oscar

Oscar Dylan,

Thanks Oscar. Appreciate your input. 

Show all comments