Hi,

I have created a button in ActivitySectionV2.

This button appears on all entries in this section.

But when you click on this button, nothing happens.

Please let me know how to fix the error.

Code:

define("ActivitySectionV2", ["ProcessModuleUtilities"], function (ProcessModuleUtilities) {
  return {
    entitySchemaName: "Activity",
    details: /**SCHEMA_DETAILS*/ {} /**SCHEMA_DETAILS*/,
    diff: /**SCHEMA_DIFF*/ [{
      "operation": "insert",
      "parentName": "DataGrid",
      "propertyName": "activeRowActions",
      "name": "runProcessButtonOpenOpportunity",
      "values": {
        "className": "Terrasoft.Button",
        /*"itemType": Terrasoft.ViewItemType.BUTTON,*/
        "caption": "Відкрити угоду",
       "click": {
          bindTo: "runProcessButtonOpenOpportunity"
        },
        "style": Terrasoft.controls.ButtonEnums.style.GREEN
      }
    }] /**SCHEMA_DIFF*/,
    methods: {
      runProcessButtonOpenOpportunity: function () {
        var activeRowId = this.get("Id");
        var args = {
          sysProcessName: "UsrProcessOpenOpportunityInActivity",
          parameters: {
            OppID: activeRowId
          }
        };
        ProcessModuleUtilities.executeProcess(args);
      }
    },
    rules: {}
  };
});

Error:

Like 0

Like

0 comments
Show all comments

Hi all, 

I'm migrating from Classic UI to Freedom a screen that has an Info button, as described in the following post:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/platform-customization/classic-ui/record-page/field/examples/attach-an-info-button

 

How can we do that in FreedomUI?

Like 0

Like

4 comments

Hi,

 

Have you tried the tooltip in the page designer at field level ?

Yes, but how can we format that text?

I'd like to add bullets in the text and breaklines

You can add add HTML to a tooltip in Freedom UI. .

If you need some dynamic content for the tooltip, you can add an attribute and bind it to the tooltip property, then set the tip at runtime by setting the attribute.

Ryan

Awesome! thanks

Show all comments

I have added a button on every record in detail for a particular column. I am trying to have one more button on the same detail, But the button is not visible on the UI.

The code that i used for this is:

{

"operation": "merge",

"name": "DataGrid",

"parentName": "DataGridContainer",

"propertyName": "items",

"values": {

"className": "Terrasoft.ControlGrid",

"controlColumnName": "UsrPlanningManagerRelevance",

"applyControlConfig": {"bindTo": "applyControlConfig"}

}

},

METHOD

applyControlConfig: function(control, activeRow) {

control.config = {

"className": "Terrasoft.Button",

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

"caption": "מסמכי רקע",//this.get("Resources.Strings.FileButtonCaption"),

"imageConfig": {"bindTo": "Resources.Images.ExportToExcelBtnImage"},

"handler": this.BackgroundDocumentsClick.bind(this, activeRow.id)

};

Can anyone help me on this?

Like 0

Like

1 comments

Hi,



I think, you can do this by appending buttons in the targeted column.

 

var baseEle = "#Identifier div[id*=\"item-" + rowId + "\"]  div:nth-last-child(2)";
$(baseEle).append(Ext.String.format("<span></span>"));
 
var ele = baseSelector + ">span";
$(ele).click(function() {});

 

Loop collection in prepareResponseCollection method or onGridDataLoaded

Show all comments

Hi everyone,

I am looking to override the functionality of the Add Record button on the Grid Page (Section Page) of the Mobile Application. Can you help me figure out the name of the method that gets called when the Add button is tapped?

Thanks & regards,

Ramya

Like 0

Like

4 comments

Hi Ramya,

 

In order to override the functionality of the Add Record button on the Grid Page of the Mobile Application follow these steps:



1) In Configuration create a Module, for example call it UsrChangeButtonLogic:

Ext.define("InvoiceGridPage.Controller", {
    override: "Terrasoft.controller.BaseGridPage",
    statics: {
        Model: Invoice
    },
    executeAddAction: function () {
        console.log('Hello1');
        this.callParent(arguments);
           console.log('Hello2');
    }
});

2) Create a replacing view module for the MobileApplicationManifestDefaultWorkplace module. Or use a mobile wizard  - it will create the manifest automatically. Add the newly created module UsrChangeButtonLogic to the manifest:

  "Models": {
        ...
        },
        "Invoice": {
            ...
            ],
            "ModelExtensions": [],
            "PagesExtensions": [
                "MobileInvoiceRecordPageSettingsDefaultWorkplace",
                "UsrChangeButtonLogic"
            ]
        }
    },

3) Compile your Workplace and synchronize the mobile application again.

 

As a result, "Add record" button click of Invoices Grid Page will be overwritten.  

 

Artem Smyrnov,

Thank you! That worked. Can you also help me figure out how to show a confirmation dialog on the mobile application? Something similar to the web app implementation of Terrasoft.showConfirmation? Thanks in advance!



Regards,

Ramya

Ramya R,



Use Terrasoft.MessageBox.showMessage ('your confirmation dialog message') to display a confirmation dialog.



Many thanks.

Artem

 

Artem Smyrnov,

The Terrasoft.MessageBox.showMessage method only helps in displaying a message to the user. I am looking for a functionality where the user is able to select "Yes" or "No" options below the message. Can you please help me with this?

Thanks,

Ramya

Show all comments

Hi everyone,



I am trying to add a custom button to the contacts section in the mobile application. I followed the steps provided in: https://community.creatio.com/articles/adding-custom-user-action-mobile… to create a custom button on the user actions list, but I was unsuccessful.



Alternatively, is there a way to add buttons to the section (list) page, or to add a button in the Freedom UI section of the mobile application?



Regards,

Ramya

Like 0

Like

2 comments

Hi Ramya,

 

Currently there is no way to add custom buttons in Freedom UI (the article you refer to will only work in classic UI). I've created a suggestion for our R&D team to make it possible to add buttons in Freedom UI using no-code capabilities and pointed them to your community question.

 

Thank you for helping us in making the app better!

Hi Oleg Drobina,

Thank you for the prompt response. In the Classic UI, is it possible to add a button somewhere other than the record's edit page, maybe in the section page or a common menu like the settings? Or is it possible to override the existing 'Add Contact' button?



Regards,

Ramya



Show all comments



I have added a custom button called "Confirm Audience" to a detail and it's working fine. but in the meantime, I need to disable the button once I click on it. So far I tried to disable it using an attribute, which is mentioned in this article.

https://community.creatio.com/questions/how-can-i-disable-button-once-clicked



While implementing that scenario I am facing an issue which is when we reload the page or go back and come back to the same record, the button behavior will be going back to its default behavior. If there is a way to achieve this please help me on this.

And this is how I added the button to my schema.



 

diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "ConfirmAudienceButton",
				"parentName": "Detail",
				"propertyName": "tools",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {"bindTo": "Resources.Strings.BEACSConfirmButtonCaption"},
					"click": {"bindTo": "onConfirmButtonClick"}, //method to trigger the button
					"style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
					"visible": {"bindTo": "getIsConfirmAudienceEnabled"}
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onConfirmButtonClick: function() {
				var recordID = this.values.MasterRecordId;
				var confirmAudienceBoolean = this.values.MasterRecordId.BEACSConfirmAudience;
				var args = {
					sysProcessName: "BEACSProcess_1df603c",
					parameters: {
						ProcessSchemaRecordId:recordID,
					}
				};
				ProcessModuleUtilities.executeProcess(args);
				this.set("isConfirmButtonClicked",false);
			},
			getIsConfirmAudienceEnabled: function() {
				return !this.$IsGridEmpty;
			},
		}

 

Like 0

Like

4 comments
Best reply

Lakindu Yasomith,

 

I am sorry for assuming that the result of the click would have other visible changes in local conditions that were not mentioned.

Since now we have the only possible condition of the button - it is either clicked or not - the only solution would be adding a global boolean variable (a checkbox) to the object that would be stored in the DB.

 

We can imagine that the column would be UsrButtonIsClicked.

You would be able to check it using this.UsrButtonIsClicked or method to call query handler "await". Please see an example by the link below:

https://academy.creatio.com/docs/developer/front_end_development_freedo…

 

Note that logic of updating this value in the database as onClick is triggered would be also required.

 

Best Regards,

Denys

Hello Lakindu,

 

In your example, the attribute "IsButtonEnabled" is true when defined.

 

attributes: {
    "IsButtonEnabled": {
		dataValueType: Terrasoft.DataValueType.BOOLEAN,
		type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		value: true
	}
}

There are some options.

 

1) First one is to use local conditions, already available on the page by setting the value to this attribute in the onEntityInitialized method:

methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				this.setIsButtonEnabled();
			},
			setIsButtonEnabled: function() {
				if (YOUR CONDITION) {
					this.set("IsButtonEnabled", true);
				}
				else this.set("IsButtonEnabled", false);
			}
		},

2) If you want to make this condition global for all users - you would need to use DataBase. For example, add a new boolean column to the connected object (It is not necessary to display this column on any page, it may just exist in the background). Read and update the value to determine if the button is visible or not.

 

Best Regards,

Dan

Hi Denis,

 I really appreciate your reply but I'm afraid you clearly didn't understand my question here. I'm asking how to disable or hide the button once the button is CLICKED. where you also mentioned "YOUR CONDITION". what I want is that "your condition" part.



Kind Regards,

Lakindu

Lakindu Yasomith,

 

I am sorry for assuming that the result of the click would have other visible changes in local conditions that were not mentioned.

Since now we have the only possible condition of the button - it is either clicked or not - the only solution would be adding a global boolean variable (a checkbox) to the object that would be stored in the DB.

 

We can imagine that the column would be UsrButtonIsClicked.

You would be able to check it using this.UsrButtonIsClicked or method to call query handler "await". Please see an example by the link below:

https://academy.creatio.com/docs/developer/front_end_development_freedo…

 

Note that logic of updating this value in the database as onClick is triggered would be also required.

 

Best Regards,

Denys

Thank you for your response. This is helpful

Show all comments

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

2 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

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