Hi Everyone,

I need to add button in the standard list (say Contacts). On click of this button, I want to call custom web service function. Is there a way I can do that. Is there any alternative available for the same.

Thanks,
Manoj

Like 0

Like

6 comments

Hello Manoj,
Thank you for your question.

There is an article available on the Academy that covers this topic with an example.

Regarding following question: "Is there any alternative available for the same". 

It depends on what you mean here. You can call a web service from different parts of an application. For example, you can make a business process that makes a call to a web service (link).

Hope this helps, let me know if you have any question left.

Yevhenii Grytsiuk,

Hi Yevhenii,

Apologies if my previous message was unclear. I want to add a button to each row in the native list, specifically as a column, and trigger a web service call when this button is clicked to sync data from another system.


 

For example, I need to add a sync icon as a column in the Project List. When the sync button for Project 1 is clicked, it should call the web service to sync data related to Project 1 from another system. Similarly, clicking the sync button for Project 2 should sync data related to Project 2, and so on.
 

I hope this clarifies my request. Thank you!

Manoj Patil,

You can add the following to the diff of the section: 

{
	"operation": "insert",
	"name": "DataGridActiveRowSyncButton",
	"parentName": "DataGrid",
	"propertyName": "activeRowActions",
	"values": {
		"className": "Terrasoft.Button",
		"style": "green",
		"tag": "sync",
		"caption": "Sync"
	}
}

 

This will add the button. Then for handling the click, add this to the methods:

onActiveRowAction: function(buttonTag, primaryColumnValue) {
	this.callParent(arguments);
 
	if (buttonTag === "sync") {
		// do your stuff here
		// primaryColumnValue is the row's Id value
 
		// you can get other values from the row using
		var row = this.getActiveRow()
		var val = row.get("UsrSomeColumn");
	}
}

Ryan

Ryan Farley,

Hi Ryan,
 

Thank you for the details. 

This section is created via Section Wizard and it correctly appears in Application Hub. However, I do not a find a place where this code needs to be added. Please guide me on the same as I am unsure if I am missing anything here.

The Section wizard creates two client schema files. One ending in "Page" and one ending in "Schema". The one ending in "Schema" is the one you want to add this code to. To see these files you need to look at the contents of the package containing your customizations, either by opening Advanced Settings from your application in App Hub or using the Advanced Settings link in the System designer.

Ryan

Ryan Farley,

I am unable to locate the System Designer icon on the Project List Page. See below screengrab.

I went to Advanced Settings and didn't find the schema files ending with "Page" and others ending with "Schema". See below screengrab.


Therefore, I navigated to Application Hub, Navigation Sections, and Selected Project which opened Projects: Section. 

 

In the Section Pages, I selected Edit Page which opened the Section Wizard screen with Tabs Pages, Business Rules, and Source Code at the top of the screen. 

 

I clicked on the Source Code tab and pasted the code at this place but it didn't reflect the new button in the list. 

 

 

I am unsure why the System Designer icon does not appear on the Project List screen. (Could it be a Creatio Version Issue? I am using Version 8.1.3.6734)
Why schema files ending with "Page" and "Schema" are not available in the Advanced Settings. (Could it be a Creatio Version Issue? I am using Version 8.1.3.6734) 
I assume I am placing the code on the Project Detail page and not on the Project List Page.

Show all comments

Hello,



I am trying to set up an action for a button in my email template. I want to create a "forward this email" button that opens up an email client when the user clicks it but there doesn't seem to be a way to do this. I can see that you can set up a text hyperlink that will open up an email to specific address, but that isn't quite what I'm after.



Does anybody know a way to do this?

Like 0

Like

4 comments

Hello Evie,

What do you mean by "opens up an email client"? Do you want to create a similar button to the base one but in the template itself? 

Dmytro Vovchenko,

Hiya,



Yes, that's it – by email client I mean whatever the end user has on their desktop for opening emails. I want the button to act as a forward button as you have shown, so that when they click it it opens their emails automatically. Do you know if that can be done?



Thanks!

Evie Cobbin,

Please take a look at this conversation, I believe this is exactly what you need.

Dmytro Vovchenko,

Hiya,



Thanks for your help but I found the conversation in the link a bit confusing to be honest. I'm wondering if there is a bit of a simpler way to do it?



Thanks,

Evie

Show all comments

Hi Everyone,

I need to Hide button based on organizational role. I've used the following code but am not able to achieve the objective.

 

attributes:{

             "IsUserX": {

                    dataValueType: Terrasoft.DataValueType.BOOLEAN,

                    type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                    value: true

                },

        },

        onEntityInitialized: function() {

                    // Calling the parent implementation of the onEntityInitialized method.

                    this.callParent(arguments);

                    this.fnIsUserX();



            },

            getSectionActions:function(){

                var actionMenuItems = this.callParent(arguments);

                actionMenuItems.addItem(this.getButtonMenuItem({

                    Type:"Terrasoft.MenuSeparator",

                    Caption:""

                }));

                //actionMenuItems.addItem(this.getButtonMenuSeparator());

                actionMenuItems.addItem(this.getButtonMenuItem({

                                        "Tag":"XYZ",

                                        "Caption":"XYZ",

                                        "Click":{"bindTo":"ABC"},

                                        "Visible": {"bindTo": "IsUserX"},

                                        "Enabled": {"bindTo": "isCustomActionEnabled"},

                                        }));

                return actionMenuItems;

            },

            isCustomActionEnabled: function() {

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

                console.log(selectedRows);

                return selectedRows ? (selectedRows.length > 0 && selectedRows.length <= 50) : false;

            },

            fnIsUserX:function(){

                var currentuser = Terrasoft.SysValue.CURRENT_USER.value;

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

                    rootSchemaName: "SysUserInRole"

                });

                esqAdmin.addColumn("SysRole");

                esqAdmin.addColumn("SysUser");

                var grpFilters = this.Ext.create("Terrasoft.FilterGroup");

                var filterUser = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "SysUser", currentuser);

                var filterRole = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "SysRole.Name", "XYZ");

                grpFilters.addItem(filterUser);

                grpFilters.logicalOperation = this.Terrasoft.LogicalOperatorType.AND;

                grpFilters.addItem(filterRole);

                esqAdmin.filters.add(grpFilters);

                esqAdmin.getEntityCollection(function(result) {

                    if (!result.success) {

                        this.set("IsUserX",false);

                        return;

                    }

                    else {

                        var length = result.collection.collection.length;

                        if (length>0){

                            this.set("IsUserX", true);

                        }

                    }

                }, this);

            },

Like 0

Like

1 comments

Hi,

 

There is no onEntityInitialized method in the section page (it's available in the edit page only). If you need the button to be visible based on the user role you need to set the value for the "Visible" attribute in the button config (inside the actionMenuItems.addItem this.getButtonMenuItem function). You can use the example of the "Change log" button from the BaseDataView module (start seeking an example using this part of code - actionMenuItems.addItem(this.getObjectChangeLogSettingsMenuItem());) where operation permission is checked to display the button (and operation permissions are assigned to roles and this is what is needed in your task).

 

Best regards,

Oscar

Show all comments

Hi Team,

 

I want to fetch the values of actions associated with the section that I'm accessing for which I have written the code given below:

 

The code is giving me the result as :

 

I'm still not able to fetch the list of action menu items as the section. Please help me fetch the values of action button items.

 

 

Thanks in advance

 

Sarika Sharma

Like 0

Like

2 comments

Hi,

 

Please explain which data do you want to fetch from these buttons.

 

Thank you!

 

Best regards,

Oscar

Hi Sarika

 

 

Here is the post where the same question is discussed:

 

https://community.creatio.com/questions/Fetchsectionactionlist

 

Please let me know if it helps!

 

Regards, 

 

Bogdan L.

 

Show all comments

Is it possible and are there any articles for adding a custom button in the action panel? I searched and was unable to find a specific question or article for this. See image and highlighted spot below. I want to add a button and link it to creating a new custom type of Activity record (in addition to the existing blue flag icon for a to-do task)

 

Like 0

Like

1 comments

Dear Mitch,

 

Thank you for your question!

 

You may find these links useful:

1. https://academy.creatio.com/docs/developer/elements_and_components/basi…

 

2. https://academy.creatio.com/documents/technic-sdk/7-16/adding-action-ed…

 

3. https://community.creatio.com/questions/how-add-custom-button-action-da…

 

4. https://community.creatio.com/questions/add-custom-buttons-actionbutton…

 

5. https://community.creatio.com/questions/how-add-button-mainheader-below…

 

6. https://community.creatio.com/questions/how-add-button-left-sections-pa…

 

Please note that this question is considered a development question, so we would recommend contacting your manager for more information.

 

Thank you!

 

Regards,

 

Danyil

Show all comments

Hi Community,

Any idea how we can show tool tip on mouse hover for action buttons on Section grid

          {

                "operation": "merge",

                "name": "DataGridActiveRowOpenAction",

                "parentName": "DataGrid",

                "propertyName": "activeRowActions",

                "values": {

                    "className": "Terrasoft.Button",

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

                    "caption": "Open",

                    "tag": "Open",

                    "visible": true

                },

            },

 

 

Like 0

Like

4 comments

Dear Fulgen,

There is a perfect Academy article here that will fit your needs. This article describes how to add pop-up hints to buttons and will be very useful for you.

Best regards,

Oscar

Hi Oscar!

I tried using the code written in the article and I can see the tooltip only for one time, if I navigate to another contact or cancel and then go back the tooltip does not appear anymore.

If I refresh the page it shoes it again but only if refreshed the contact edit page and again the minute I leave the page I can't see it anymore until refreshing again.

Can you or someone else advise?

Oscar Dylan,

Chani Karel,

Hello!

 

Can you please provide us with the code itself that you've used when creating tips? To which entity have you added the tip?

 

I've added a test tip to the contact email address column and it is displayed correctly and doesn't disappear:

{
				"operation": "merge",
				"name": "AccountEmail",
				"values": {
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 5
					},
                  "tip": {
                    "content": { "bindTo": "Resources.Strings.EmailTipContent" },
                    "displayMode": Terrasoft.controls.TipEnums.displayMode.WIDE
                  }
				}
			},

Best regards,

Oscar

Oscar Dylan,

Hi, Thank you!

I add the tip to the save button of the opportunity entity.

this is the code I use :

 

    "operation": "merge",

                "parentName": "LeftContainer",

                "propertyName": "items",

                "name": "SaveButton",

                "values": {

                    // Pop-up hint for a button.

                    "hint": { "bindTo": "Resources.Strings.ToolTip" } ,

                }

 

The code you provided is for a field tooltip, that one works from the article too.

The problem happens only with the tooltip for button.

In the article the button is example # 1 and the field is example # 2.

Thank you so much!

Show all comments