Hi Everyone,

 

I was thinking of a button within my screen. This button will be used to change tabs. There are different tabs (Steps) on my screen. And when a user clicks on this button it takes him to the next tab, which is his next step also. So instead of clicking on tabs themselves. Is it possible to do it through buttons? Thanks!

Like 0

Like

5 comments

Hello,

 

Please note that there is no way to achieve such logic using basic user tools at the moment. 

However, we registtered this idea for our R&D team for review and this functionality may appear in future releases.

Assuming this is a classic page, you can do the following, passing the Code for the tab you want to set as the active/selected tab:

// set tab with code "GeneralInfoTab" as selected tab
this.setActiveTab("GeneralInfoTab");

Full article here on this topic: https://customerfx.com/article/programmatically-selecting-showing-or-hi…

If this is a Freedom UI page, not sure.

Ryan

Being able to do so in Freedom UI is a must. Anybody have any way of doing so? There must be some way.

It looks like this can be achieved in Freedom UI by setting the attribute <Tab element code>_SelectedTabIndex_Profile to the index of the tab you want to display, so the first tab would be 0, the second 1 etc. To show the 2nd tab for me, the code was:

request.$context.Tabs_SelectedTabIndex_Profile=1

Worth noting that when I try to set this in the init event (crt.HandleViewModelInitRequest) it throws an error in the console (though it does change the tab, so not sure what actually breaks, if anything). I worked around this by putting the set of the value inside a JS timeout for 800ms, which is quick enough to not really be noticeable to users while preventing the error. I'm guessing it's some kind of data loading race condition or something, loading the data for a tab that then isn't being shown.

Show all comments

I am trying to disable the "Complete" button on any user task in a Case if any of the Checklist entries have not been completed for that Case. Does anyone know of a way to achieve this or have any examples ?

Like 0

Like

2 comments

Run a process from the case that carries out the checks (displaying messages if errors) before creating the task?

Gareth Osler,

Thanks for the reply however this assumes the checking should be done when creating a task. I need to be able to intercept the hover over an existing task and at that point check the criteria and either enable or disable the "Complete" button before it appears against the task.

Show all comments

Hi,

 

I am trying to open a new webpage from a button onclick action. I saw this feed:

https://community.creatio.com/questions/how-open-new-webpage-button-onc…

 

I'm very new in Creation so I tried to replicate it on a page definition. What's wrong with the following code:

 

define("UsrPage_bwxynuo", /**SCHEMA_DEPS*/[]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/()/**SCHEMA_ARGS*/ {

    return {

        methods: {

            openWindow: function() {

                 var path = this.get("https://fr.wikipedia.org");

                 window.open(path, '_blank');

             }

        },

        viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[

            {

                "operation": "insert",

                "name": "Button_w36eyol",

                "values": {

                    "itemType": Terrasoft.ViewItemType.BUTTON,

                    "click": {"bindTo": "openWindow"},

                },

                "parentName": "MainContainer",

                "propertyName": "items",

                "index": 0

            }

        ]/**SCHEMA_VIEW_CONFIG_DIFF*/,

        viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{}/**SCHEMA_VIEW_MODEL_CONFIG*/,

        modelConfig: /**SCHEMA_MODEL_CONFIG*/{}/**SCHEMA_MODEL_CONFIG*/,

        handlers: /**SCHEMA_HANDLERS*/[]/**SCHEMA_HANDLERS*/,

        converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,

        validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/

    };

});

Like 0

Like

2 comments
Best reply

Hello,

From the code you posted, you're using the newer type of page (Freedom UI), but how you wired up the click of the button to call your method is how you do this on the older classic pages. To wire up the click of your button execute your own code, see this article: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o…

Ryan

Hello,

From the code you posted, you're using the newer type of page (Freedom UI), but how you wired up the click of the button to call your method is how you do this on the older classic pages. To wire up the click of your button execute your own code, see this article: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o…

Ryan

Thank you very much Ryan

Show all comments

Show a button if the selected entry has certain conditions ("Test.Lookup == Test 1")

 

Example

Card: Lead

Lookup: Stage Lead

value: one of the stages

 

 

diff: /**SCHEMA_DIFF*/[           

               {

                  "operation": "insert",

                "name": "NewButton",

                "values": {

                    "itemType": 5,

                    "style": "red",

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

                    "click": {"bindTo": "onProcess1"},

                    "enabled": true,

                    "visible": true,

/**How to Show/Hide the custom button

                    

                        "classes": {

                        "textClass": [

                            "actions-button-margin-right"

                        ]

                    }

                },

                "parentName": "ActionButtonsContainer",

                "propertyName": "items",

File attachments
Like 0

Like

1 comments

Hello,

To do this, you'll do the following: 

  1. Add a boolean attribute
  2. Bind the boolean attribute to the visible property of the button
  3. Set the attribute to true/false to show/hide the button as necessary

You can see an example of this here: https://customerfx.com/article/how-to-enable-or-disable-a-field-on-a-pa…

Ryan

Show all comments

Hi 

i have a little problem with new order button on opportunity.

I want this button was visible only when stage of opportunity is Closed Won stage

i've changed in BP adding filter. Maybe it's something with package ? When I add this filter current package changed and i can't save as OrderInSales the proper package. Even I change current package on custon this is not working.

 

Like 0

Like

2 comments

Hello,

 

Please note that there is no option to hide the button with a business process.

Hi

So there is no option to make button "Add New order" stay hidden until the opportunity stage change on Closed Won?

Show all comments
Question

Hello, community!

 

Is there any way that I can customize the appearance of the task? So, instead of it being with a single button - "completed" could I remove this "completed" button and add two more of my own? Something like this:

Like 0

Like

3 comments

Hi Nicolaiciuc Maria,



Do you want to customize this task in the dashboard?

i.e the tasks appear in the section dashboard area.



BR,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

I am not sure what do you mean by dashboard. I want these buttons right in the section page of the record, where the tasks usually apear. I will attach a photo for you. Thank you!

Nicolaiciuc Maria,



Thanks for clarifying!

 

To change the view of the task (modify the buttons) in the action dashboard (the place where you want as attached in your screenshot) you can do the following: 

 

STEP 1: Create your own module extending "BaseDashboardItemViewConfig" and changing the Item view as you need. You can see how the fields are displayed in the getActionsViewConfig() method, which you would need to modify. 

define("UsrDashboardItemViewConfig", ["BaseDashboardItemViewConfig"], function() {
    Ext.define("Terrasoft.configuration.UsrDashboardItemViewConfig", {
        extend: "Terrasoft.BaseDashboardItemViewConfig",
        alternateClassName: "Terrasoft.UsrDashboardItemViewConfig",
 
        getActionsViewConfig: function() {
            return {
                "name": "Actions",
                "itemType": Terrasoft.ViewItemType.CONTAINER,
                "classes": {wrapClassName: ["dashboard-item-actions on-hover-visible"]},
                "items": [
                    {
                        "name": "NO",
                        "itemType": Terrasoft.ViewItemType.BUTTON,
                        "style": Terrasoft.controls.ButtonEnums.style.BLUE,
                        "caption": "No",
                        "click": {"bindTo": "onCancelButtonClick"},
                        "classes": {
                            "textClass": "dashboard-item-right"
                        },
                        "visible": {"bindTo": "CancelButtonVisible"}
                    },
                    {
                        "name": "YES",
                        "itemType": Terrasoft.ViewItemType.BUTTON,
                        "style": Terrasoft.controls.ButtonEnums.style.BLUE,
                        "caption": "Yes",
                        "click": {"bindTo": "onExecuteButtonClick"},
                        "classes": {
                            "textClass": "dashboard-item-right"
                        },
                        "visible": {"bindTo": "ExecuteButtonVisible"}
                    },
 
                ]
            };
        }
    });
});



STEP 2: Create a replacing SectionActionsDashboard schema and add your modules to the dependencies. 

 

define("SectionActionsDashboard", ["UsrDashboardItemViewConfig"], function() {
    return {
 
        methods: {
            initDashboardConfig: function() {
                this.callParent(arguments);
                const dashboardConfig = this.get("DashboardConfig");
                var activityItemsConfig = {
                    "Activity": {
                        viewModelClassName: "Terrasoft.ActivityDashboardItemViewModel",
                        viewConfigClassName: "Terrasoft.BaseDashboardItemViewConfig"
                    }
                };
                if (this.$entitySchemaName === "Case") {
                    activityItemsConfig.Activity.viewConfigClassName = "Terrasoft.UsrDashboardItemViewConfig";
                }
                Ext.merge(dashboardConfig, activityItemsConfig);
                this.set("DashboardConfig", dashboardConfig);
            }
        }
    };
});

 

 



BR,

Bhoobalan Palanivelu.

 

 

Show all comments

I need the button that I created "Adjust Inventory" to be visible only when the page is not with altered fields without having the values saved.

So when it is unsaved it will show like this:

And when you have the "Save" and "Cancel" buttons visible, it should be disabled.

Like 0

Like

3 comments

Hi Gabriel,



Can you please check the SchemaPageV2 of your object?

That should have the Button definition in the Diff array and you can add the Visible: false property to it to remove it from your edit page.





BR,

Bhoobalan Palanivelu.

 

Bhoobalan Palanivelu,

I created an attribute to be able to disable it when there is an unsaved field, the problem is that I can't change it, and the page in the two images above are the same page, it is a detail page.

 

Gabriel Cassimiro,

 

Could you please share with us more details on the page/detail where you are using this, and the current code implementation that you have for your button?

 

Best regards,

Dariy

Show all comments

Hello, community!

This is a selection window for my lookup. Lets take this example, I should not be able to select collaterals that have remaining allocation 0. My problem is that this field is being populated by a process, and the regular lookup filtration does not work. Is there any way to make that select button throw an error/ not let the user save their pick? As in, if remaining allocation equals 0 => select button will do nothing.

Like 0

Like

1 comments

Hello Maria,

Modifying this module window is quite a hard task to do. I believe is your case attribute filter will work just fine:

attributes: {
			"{Your lookup column Name}": {
                "dataValueType": Terrasoft.DataValueType.LOOKUP,
                "lookupListConfig": {
                    "filters": [
                        function() {
                            var filterGroup = Ext.create("Terrasoft.FilterGroup");
                            filterGroup.add("IsNotNull",
                                Terrasoft.createColumnFilterWithParameter(
                                    Terrasoft.ComparisonType.GREATER,
                                    "[{Your lookup column Name}:Id].RemainingAllocation", 0));
                            return filterGroup;
                        }
                    ]
                }
            }
		},

With these records where the remaining allocation is 0 will not be displayed.

Show all comments

Hello,

 

I am willing to change publish button caption. any ideas how can we do this? I tried to override the module but in vain.

 

Like 0

Like

1 comments

Hello,

If you want to change the caption of the publish button then you need to create a replacing schema of BaseMessagePublisherPage and in it change the value of the PublishButtonCaption localizable string

 

Show all comments

Hello,



I would like create multiple buttons that call a business process. Due to the number of buttons in my page, I would like to create a single button click method. This method would receive a parameter that would tell it which button was called. The parameter would then determine which field would be read.



My button method should look something like this:

 onButtonClick: function(clickedButton){
				var recordId = this.get("Id");
                var readField = "Error"; //This value should change later, will show error otherwise
 
                switch(clickedButton){
                    case "Button1":
                        readField = this.get("Field1");
                        break;
                    case "Button2":
                        readField = this.get("Field2");
                        break;
                    /*More Cases
                    .
                    .
                    .
                    */
                   default:
                    console.log(readField);
                    break;
                }
 
                var config = {
                    sysProcessName: "UsrBpToCall",
                	parameters: {
						CurrentRecordId: recordId,
						ReadField: readField,
 
					}
				};
                ProcessModuleUtilities.executeProcess(config);
}

I assume the parameter would appear in the diff section, but I do not know how to implement this functionality.



I appreciate your help!

 

Kind Regards,

Firas



 

Like 1

Like

3 comments
Best reply

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Ryan Farley,



the solution works perfectly. Thank you.



I have a follow-up question if you do not mind. Does the tag being passed as the fourth argument mean that button click methods can take up to 4 arguments?  If that is the case how can one proceed if they were to pass more than one argument and populate p1 through p3? 



Thank you again, your Community responses and articles have been very helpful.



Firas

Hello,

 

Not sure about passing 4 arguments to the click event, I've been using the tag property only to pass the parameter needed. In your case you can bind the click-handler method to several buttons and specify different tags for it so the click-handler method could understand what to do according to the button tag.

Show all comments