Announcement

Collapse
No announcement yet.

Voip Extension add "make a call button" to the small form of the call entity

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

  • Voip Extension add "make a call button" to the small form of the call entity

    Greetings,

    I have purchased the VoIP extension and i was tying the add the "make a call button" to the small form of the call entity (see attached)
    the Idea is to shorten the path and avoid opening the full form, i know that i can enable click to dial directly on the number and avoid the button entirely but the button can be forced to call the default number assigned directly.

    Can someone from the community help me with the task?


  • #2
    Hello,
    From the documentation: https://github.com/espocrm/documenta...ail-modal-view
    Dropdown action in detail modal view


    Available as of v7.2.

    Everything is the same as for the detail view. The only difference is that the metadata parameter name is modalDetailActionList.
    Edit: Sorry, this is to add a dropdown button, to add a button you have to declare a custom modalViews, I can help you with that.
    Last edited by Kharg; 10-02-2022, 02:09 AM.

    Comment


    • #3
      Thank you Kharg for the reply,

      adding the button is the easy part as you said is well documented, giving it the function to dial is where i am stuck.
      although the function is within the same entity i cant reach the part to generate action/dialFromCall

      Hoping that tarasm can help with this.

      cheers​

      Comment


      • #4
        This should work:
        Call.json (custom\Espo\Custom\Resources\metadata\clientDefs)
        PHP Code:
        {
        "modalViews": {
        "detail""custom:views/call/modals/detail"
        },
        "color"null,
        "iconClass""fas fa-phone"
        }​ 

        detail.js (client\custom\src\views\call\modals)
        PHP Code:
        Espo.define('custom:views/call/modals/detail''crm:views/meeting/modals/detail', function (Dep) {
          return 
        Dep.extend({
              
        setup: function() {
                  
        Dep.prototype.setup.call(this);
                
        this.addButton({
                      
        name'Dial',
                      
        label'Make a Call',
                      
        style'warning',
                      
        acl'edit',
                      
        pullLefttrue,
                      
        action'Dial'
                 
        }, true);
            },

            
        actionDial: function (datae) {
              (
        copy the action from client\modules\voip\src\views\call\detail.js)
          }
        });
        });
        ​ 
        You can also repackage it in an extension for better usability.
        Last edited by Kharg; 10-02-2022, 07:23 PM.

        Comment


        • #5
          Thank you Kharg! The solution provided worked perfectly.

          Comment

          Working...
          X