Hide Section Button on Edit Page

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


Thanks you!

Like 0



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.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


Show all comments