Extra button link
Collapse
X
-
Ok thanx it's working.
But tell me please how to make directly button instead of dropdown action?
I guess that i need to change this.menu.actions.push ? But for what?
And how open links in new card instead the same window?Last edited by homeempire; 07-10-2015, 11:11 AM.Leave a comment:
-
You should put that code into setup method. Take some of existing classes as an expample.Leave a comment:
-
Ok I have own class. I put detail.js in client/custom/src/views/account. My code:
Code:Espo.define('Custom:Views.Account.Detail', 'Views.Detail', function (Dep) { return Dep.extend({ relatedAttributeMap: { 'contacts': { 'billingAddressCity': 'addressCity', 'billingAddressStreet': 'addressStreet', 'billingAddressPostalCode': 'addressPostalCode', 'billingAddressState': 'addressState', 'billingAddressCountry': 'addressCountry', 'id': 'accountId', 'name': 'accountName' }, }, }); });
Can You give me a code ? I try with this but it doesn't work:
Code:Espo.define('Custom:Views.Account.Detail', 'Views.Detail', function (Dep) { return Dep.extend({ relatedAttributeMap: { 'contacts': { 'billingAddressCity': 'addressCity', 'billingAddressStreet': 'addressStreet', 'billingAddressPostalCode': 'addressPostalCode', 'billingAddressState': 'addressState', 'billingAddressCountry': 'addressCountry', 'id': 'accountId', 'name': 'accountName' }, }, this.menu.actions.push({ 'label': 'Zadzwoń', 'link': 'tel: ' + this.model.get('name'), 'acl': 'read' }); }); });Leave a comment:
-
You can't do this via clientDefs. You will need to create own class for detail view (Custom:Account.Detail) and add your button dynamically with "link": 'tel: ' + this.model.get('youField') instead of "action"Leave a comment:
-
Extra button link
Hi.
I add extra button to Account Entity. I add this code to clientDef:
"menu": {
"detail": {
"buttons": [
{
"label": "Zadzwoń",
"action": "zadzwon",
"acl": "read",
"style": "default"
}
]
}
},
and button is ok.
but….
My question is how to make button to link: "tel: {name}" ?Tags: None

Leave a comment: