Hi, community.

 

When you click an activity on the calendar page, you get this mini page where you can complete the activity or cancel it. I need to remove the "cancel activity" button highlighted here in red:

 

I figure I can use the remove operation like in this example:


 
diff: 
/**SCHEMA_DIFF*/[ 
{ "operation": "remove", "name": "CopyButton" }, 
{ "operation": "remove", "name": "DeleteButton" }, 
{ "operation": "remove", "name": "OpenButton" } }

 

But I can't find  the schema I have to modify.... Does anyone know which one it is?

 

Thanks!

Like 1

Like

2 comments
Best reply

Hello,

 

It is ActivityMiniPage of UIv2 package. You need to re-define the insert operation of CancelButton

Regards,

Dean

Hello,

 

It is ActivityMiniPage of UIv2 package. You need to re-define the insert operation of CancelButton

Regards,

Dean

dean parrett, Thank you very much for your answer! It works as intended.

Cheers from Mexico

Show all comments

Hi,



I wanted to asks if it is possible to add new button below the help (?) button in mainHeader? This one (MainHeaderSchemaInnerRightButtonsContainerContainer) is located in the rightPanel above the communication panel.





Thanks!

Like 1

Like

2 comments
Best reply

Hi Solem,

 

You will need to extend MainHeaderSchema module and add your custom container and button inside the container there. Please study the base implementation of the MainHeaderSchema to see how the "System designer" button is added for example:

Best regards,

Oscar

Hi Solem,

 

You will need to extend MainHeaderSchema module and add your custom container and button inside the container there. Please study the base implementation of the MainHeaderSchema to see how the "System designer" button is added for example:

Best regards,

Oscar

Hi,



Thanks for checking on my question, I'm gonna try that and get back to you!.

Show all comments

Hi,

i would like to know how can i access the array of items inside this ProcessRun Button:

I've tried to use "EditPages" and "diff" from the page, but it didn't work.

Best Regards.

Thanks in advance.

 

 

Like 0

Like

1 comments

Dear Pedro, 

You can access the content of the list by getting the value of an attribute RunProcessButtonMenuItems:

 var processButtonMenuItems = this.get("RunProcessButtonMenuItems");

 

Show all comments

Hi,

On Customers listview I need to show Grid Action buttons on load of listview in separate columns (screenshot), currently buttons are showing only on click on record.

Any help will be highly appreciable

 

Regards

Like 0

Like

1 comments

Hi Muhammad,



A similar functionality was described in comments here.



Regards,

Dmytro

Show all comments

Hi,

is it possible to apply filters to the addRecord button? If so, how can i apply them and execute methods when pressing it.

This print shows the section page with the addRecord button "Novo".

Like 0

Like

1 comments

Dear Pedro,

In order to apply filters to the “addRecord” button please do the following:

1. Create a replacing client schema module. Please find more information in the article by the link below:

https://academy.creatio.com/documents/technic-sdk/7-15/creating-custom-client-module-schema

2. Set “Parent object” property to “Base data view” value https://prnt.sc/psavyp

3. Use the following code as an example:

define("BaseDataView", [], function(){

return{

                messages: {},

                mixins: {},

                methods: {                                         

                // new custom method

                TestMethod: function(){

                                return true;

                },

                // overriding addRecord method

                addRecord: function(typeColumnValue){

                var schema = this.getEditPageSchemaName(typeColumnValue);

                if(schema === "AccountPageV2"){

                                // use here your methods or filters

                                this.TestMethod();

                                }

                this.callParent(arguments);

                }

                },

                diff: /**SCHEMA_DIFF*/ [] /**SCHEMA_DIFF*/

                                };

});

 

Please find more information about filters in the article by the links below:

https://academy.creatio.com/documents/technic-sdk/7-14/entityschemaquery-class-filters-handling?_ga=2.100001118.1940880110.1572861922-1199877090.1572861922

https://academy.creatio.com/documents/technic-sdk/7-13/entityschemaquery-filters-handling?_ga=2.5228019.1940880110.1572861922-1199877090.1572861922

4. In case, if it is need to apply a filter only for particular sections, please add a name of these sections to the following part of code:

if(schema === "Section name"){

// use here your methods or filters

                this.TestMethod();

}

 

Please note that it is possible to find the name of the particular section in the query string. For example, for Account section the name is “AccountSectionV2”. Please see the screenshot below:

https://prnt.sc/psb2jp

 

Best regards,

Norton

Show all comments

When I open my page on a large screen the simple info button / user hint appears as desired/correctly:

However, when I minimize the screen or view my page on a smaller screen, the simple info buttons / user hints appear over the top of the boolean field, where as the text field info button remains the same?

How am I able to wrap the info button to the boolean fields?

Like 0

Like

1 comments

Please feel free to modify CSS according to your needs. The article by the link below explains how to add a new CSS class. If you add it to the BootstrapModulesV2 module then it will be loaded after loading the application. 

https://community.bpmonline.com/questions/how-add-custom-style-control-…

Show all comments

Hello. i'd like to hide the 'Run Process' -button in the Side Panel for certain Roles.

As well as change the contents of the drop-down of the 'Home' -button next to it.

Like 0

Like

3 comments

Dear Julius, 

In order to hide the button menu, you need to override the basic functionality, which involves development within the system.

Firstly, you need to override basic schema LeftPanelTopMenuModule. Please find the loadMenu method. There you can see that visibility of the button in based on user type. You can add your custom method to check current user rights and set the visibility based on the response result:

Here is an example of how to check current user role. In the example we are hiding the Menu button form non-administrators role. You can adjust the code up to your needs. (the example involves creating of custom CSS style and adding it to the schema dependencies):

 

As for the list of menu items, please take a look at  loadItemsMainMenu method, which is responsible for its logic.

Hope you will find it helpful.

Regards,

Anastasia

Anastasia Botezat,

 

How do you override the LeftPanelTopMenuModule module? I cannot create a replacing client module, so not sure how I would go about this. Is it no longer possible to do this?

Hi Harvey Adcock,

 

In order to replace "LeftPanelTopMenuModule" client module schema, please follow the steps described below:

 

1. Please go to Configuration > Add > Module

2. In the appeared empty module, please add the code below:

define("UsrLeftPanelTopMenuModule", ["LeftPanelTopMenuModule", "LeftPanelTopMenuModuleResources"],
 function() {
 Ext.define("Terrasoft.UsrLeftPanelTopMenuModule", {
 override: "Terrasoft.LeftPanelTopMenuModuleViewModel",
 /*
 * @override
 */
			...
 });
 }
);

Also, please add Title "UsrLeftPanelTopMenuModule" and Name "UsrLeftPanelTopMenuModule", choose the package. Important: do not set the parent object. Save the module.

 

3. Then, you need to replace "BootstrapModulesV2". Here is the article on how to replace client module schema:

 

https://academy.creatio.com/documents/technic-sdk/7-16/creating-custom-client-module-schema

 

4. In a new replacing client schema, please insert the code below:

 

define("BootstrapModulesV2", ["UsrLeftPanelTopMenuModule"], function() {
	return {};
});

Set "BootstrapModulesV2" as Title and Name, set "BootstrapModulesV2" (NUI) as a parent object, set replace parent input checked. 

 

5. Save the changes and hard-reload the page. 

Show all comments

Hi community!

I add a button section but i want it don't show when I open edit page. In this case, i add a section button on Contact Section. I show images below

Regards,

Thanks you!

Like 0

Like

4 comments

Hello Ezequiel,



You need to define an attribute that will determine the visibility of your button. By default, it will be true. Then you need to override onCardRendered method in your replacing schema for Contact Section and set the attribute as false.

Please, see my example:

 

define("ContactSectionV2", [],

    function() {

    return {

        entitySchemaName: "Contact",

        attributes: {

            "ButtonVisible": {

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "value": true

            }

        },

        messages: {},

        methods: {

             onCardRendered: function() {

                 this.callParent();

                 this.set("ButtonVisible", false);

             }

        },

        diff: /**SCHEMA_DIFF*/[

            {

                "operation": "insert",

                "parentName": "ActionButtonsContainer",

                "propertyName": "items",

                "name": "MainContactSectionButton",

                "values": {

                    itemType: Terrasoft.ViewItemType.BUTTON,

                    caption: { bindTo: "Resources.Strings.TestButton" },

                    "visible": {bindTo: "ButtonVisible"},

                    "layout": {

                        "column": 1,

                        "row": 6,

                        "colSpan": 1

                    }

                }

            }

        ]/**SCHEMA_DIFF*/

    };

});

 

Tetiana Markova,

Hi! I wanted to use this code also, but i have a question. Where do I insert the name of my button? 

Tetiana Markova,

 

I don't know if you are still following this thread, but the problem with this method is that when the user closes the edit page the button is not restored to the section list page.  Any solution?

 

Thanks,

The way I got round the above was to include the following method:

			showSection: function() {
				this.callParent();
				this.set("ButtonVisible", true);
			},

This reshows the buttons.  This is purely a hack and unofficial, caveat emptor.

Show all comments

Hi community!

How are you?

How could I add a button on row section?

Thanks you!

Regards,

Ezequiel!

Like 0

Like

2 comments

Please investigate the code in the basesectionv2 module. Please use google chrome dev tools for the investigation.

You can create a replacing client module for the section and add the button in the same way as other buttons were added. 

http://prntscr.com/kqgyym

Additionally, you'll need to override the "onActiveRowAction" method and add a handler for the button. 

http://prntscr.com/kqgzs4

 

Miroslav Kytka,

define("AccountSectionV2", ["AccountSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Account",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "MyCustomLockAction",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
				"values": {
					"className": "Terrasoft.Button",
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"caption": resources.localizableStrings.UsrLockCaption, 
					"tag": "lock",
					"enabled": true,
					"visible": true
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {}
	};
});

 

Show all comments

 

I have a case, I want to make two or more buttons on a page.

I've create it, but only one button appears, the second button doesn't appear.

When I refresh the page, a second button appears. Below screenshoot and the code that I use to make these 2 buttons.

Source code in section: 

define("UsrExampleBtn1Section", [], function() {
	return {
        entitySchemaName: "UsrExampleBtn",
        methods: {
            onClickTest1: function() {
                console.log("Test 1 Button Clicked..");
            },
            onClickTest2: function() {
                console.log("Test 2 Button Clicked..");
            },
        },
		diff: /**SCHEMA_DIFF*/[
            /**
             * Element Test Button 1
             */
            {
                "operation": "insert",
                "parentName": "CombinedModeActionButtonsCardLeftContainer",
                "propertyName": "items",
                "name": "Test1Btn",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: {
                        bindTo: "Resources.Strings.TestBtn1Caption"
                    },
                    click: {
                        bindTo: "onClickTest1"
                    },
                    "style": Terrasoft.controls.ButtonEnums.style.BLUE,
                }
            },
 
            /**
             * Element Test Button 2
             */
            {
                "operation": "insert",
                "parentName": "CombinedModeActionButtonsCardLeftContainer",
                "propertyName": "items",
                "name": "Test2Btn",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: {
                        bindTo: "Resources.Strings.TestBtn2Caption"
                    },
                    click: {
                        bindTo: "onClickTest2"
                    },
                    "style": Terrasoft.controls.ButtonEnums.style.GREEN
                }
            },
 
        ]/**SCHEMA_DIFF*/,
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
	};
});

Source code in page:

define("UsrExampleBtn1Page", [], function() {
	return {
		entitySchemaName: "UsrExampleBtn",
        methods: {
            onClickTest1: function() {
                console.log("Clicked Test Button 1");
			},
            onClickTest2: function() {
                console.log("Clicked Test Button 2");
            },
        },
		diff: /**SCHEMA_DIFF*/[
 
			/**
             * Element Test Button 1
             */
            {
                "operation": "insert",
                "parentName": "LeftContainer",
                "propertyName": "items",
                "name": "Test1Btn",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: {
                        bindTo: "Resources.Strings.TestBtn1Caption"
                    },
                    click: {
                        bindTo: "onClickTest1"
                    },
                    "style": Terrasoft.controls.ButtonEnums.style.BLUE
                }
			},
 
			/**
             * Element Test Button 2
             */
            {
                "operation": "insert",
                "parentName": "LeftContainer",
                "propertyName": "items",
                "name": "Test2Btn",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: {
                        bindTo: "Resources.Strings.TestBtn2Caption"
                    },
                    click: {
                        bindTo: "onClickTest2"
                    },
                    "style": Terrasoft.controls.ButtonEnums.style.GREEN
                }
			},
		]/**SCHEMA_DIFF*/,
	};
});

Is there something wrong in my code? I have checked the console, but there is no error. any solution for my case? Thanks



*SOLVED

Add all button caption in section and page

Like 1

Like

4 comments

Dear Romadan,

It seems you have forgot to add the caption "TestBtn2Caption" in Section schema.

I have added the same buttons with 2 captions both in Section and Page schemas and they are displayed correctly, but once I delete the caption in Section schema I was able to see the same results - the second button was appearing only after I refresh the page.

Please check the caption in the Section schema and make sure it is added correctly.

Oleh

 

I check caption 'TestBtn2Caption' in schema, and I forgot to add.

Thanks Oleh.

 

Dear Romadan & Oleh,



This case is same with my problem.

Thank you for this post and solved very helpful.



Ali

Dear Romadan,

Don't forget about me.

Show all comments