Actions on the Contact page depending on the contact's type 7.4

Hi,

I need to add a special Action to the Contact's page that will be available only for Contact with a certain type. I am struggling with the replacing Contact module and can't figure out what to replace.

File attachments
Like 1

Like

1 comments

Hi Sophie,

You nead to replace the getActions method in the Contact page scheme:

getActions: function() {

// we obtain parent actions

        var actionMenuItems = this.callParent(arguments); 

// and add new actions

        actionMenuItems.addItem(this.getActionsMenuItem({ // separator

                Type: "Terrasoft.MenuSeparator",

                Caption: ""

        }));

        actionMenuItems.addItem(this.getActionsMenuItem({

// click handler

                "Click": {"bindTo": "openMultiCash"}, 

// caption

                "Caption": {"bindTo":"Resources.Strings.openMultiCashCaption"},

// enable the action (works tha same as 'Visible' property)

                "Enabled": { "value": "true" } // directly

//or connect to the function {"bindTo": "enabledMethod"}

 // tag, if necessary

                "Tag": "openMultiCash"

        }));

// return the result

        return actionMenuItems;

}

Show all comments