Announcement

Collapse
No announcement yet.

Creating Custom Buttons (with custom actions)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • yuri
    replied
    Debug client/src/views/main.js showHeaderActionItem. For some reason you have property 'menu' defined in a wrong way. Could be that you messed it in metadata > clientDefs.
    Last edited by yuri; 06-16-2020, 02:30 PM.

    Leave a comment:


  • Kyle
    replied
    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:


  • sttn
    replied
    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:


  • sttn
    replied
    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:


  • yuri
    replied

    Leave a comment:


  • rodrigocoelho
    replied
    It would be good to have a complete example. Maybe a tutorial.

    Leave a comment:


  • ming
    replied
    guys..could you guys give me the code to create the custom button please. its been a week i trying all by myself.

    Leave a comment:


  • homeempire
    replied
    How can I make button link to: " tel: {AccountName} " ?

    Leave a comment:


  • yuri
    replied
    You need to create action in js view file. You can take Email as an example.

    Leave a comment:


  • info@jaguarsoft.com
    replied
    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:


  • irvingbach
    replied
    Thank you! Both options worked fine!

    Leave a comment:


  • yuri
    replied
    You can do it also in metadata > clientDefs.

    Example:
    application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json

    Leave a comment:


  • tarasm
    replied
    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'
    });
    Example you find in the file client/modules/crm/src/views/call/detail.js

    Leave a comment:


  • irvingbach
    started a topic Creating Custom Buttons (with custom actions)

    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?
Working...
X