Announcement
Collapse
No announcement yet.
Creating Custom Buttons (with custom actions)
Collapse
X
-
I also have followed the documentation example and get the same error as sttn when viewing any record that has the button hidden due to the status. If the status of the record allows for the button to be shown then everything works fine, however if the button is hidden then there is the JS error. TypeError: Cannot read property 'forEach' of undefined
I commented the code inside the controlButtonVisibility function and was able to continue working. Any help on how to avoid the error when hiding the button would be appreciated.
Leave a comment:
-
I get following error in the debugger from Chrome:
VM7991:257 Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
at child.eval (eval at _execute (loader.js:94), <anonymous>:257:30)
at Array.forEach (<anonymous>)
at child.showHeaderActionItem (eval at _execute (loader.js:94), <anonymous>:256:48)
at child.controlButtonVisibility (eval at _execute (loader.js:94), <anonymous>:22:27)
at child.initSomeName (eval at _execute (loader.js:94), <anonymous>:12:18)
at eval (eval at _execute (loader.js:94), <anonymous>:78:60)
at Espo.Loader.load (loader.js:292)
at Espo.Loader.require (loader.js:154)
at root.require.Espo.require (loader.js:423)
at eval (eval at _execute (loader.js:94), <anonymous>:76:29)
Leave a comment:
-
I tried the example and it does not work with Version 5.8.3. I cleen the cache, reload the page etc...
Leave a comment:
-
It would be good to have a complete example. Maybe a tutorial.
Leave a comment:
-
guys..could you guys give me the code to create the custom button please. its been a week i trying all by myself.
- Likes 1
Leave a comment:
-
You need to create action in js view file. You can take Email as an example.
Leave a comment:
-
Hi there!
As suggested above, I have added my custom button to my custom.json for detail. Button shown OK and goes to target (in my case my custom pdf entity)
is there any easy way to pass parameters to target like ; detail": {"buttons": [
...........
"link": "#Pdf?ent={entityType}&entid={entityId}",
Thanks in advance,
Selcuk
Leave a comment:
-
You can do it also in metadata > clientDefs.
Example:
application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json
- Likes 1
Leave a comment:
-
Yes, it's possible. You have to add to your view detail.js file the code:
Code:this.menu.actions.push({ 'label': 'Custom Action', 'action': 'customAction', 'acl': 'edit' });
- Likes 1
Leave a comment:
-
Creating Custom Buttons (with custom actions)
Hi Yuri!
I want to customize my EspoCRM, i want to generate some specific reports por some custom Entities. My question is how can i create a button which calls a new window (calling an specific PHP document) and display the info that i need to print. Is it possible?Tags: None
Leave a comment: