Announcement

Collapse
No announcement yet.

Creating a Custom Dashlet

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

  • Creating a Custom Dashlet

    Hello. I want to create custom dashlet based on the LEAD status. I would like to display it much like OPPERTUNITIES display, with listing the Name of the status and the number of leads within that status. I looked around but have not seen much documentation on how to create a custom dashlet. Any pointers?

  • #2
    Please disregard. https://docs.espocrm.com/development...ate-a-dashlet/

    Comment


    • #3
      You can use the documentation you posted and get examples of chart dashlets at
      /application/Espo/Modules/Crm/Controllers/Opportunity.php (see getActionReportByLeadSource() definition)
      as well as
      /application/Espo/Modules/Crm/Services/Opportunity.php (see reportByLeadSource() definition)

      You should overwrite the /custom/Espo/Custom/Controllers/Opportunity.php file with the getActionReportByLeadStatus() function to get the JSON data for the chart.

      You also need to place the JS file in /client/custom/src/views/dashlets/opportunities-by-lead-status.js using /client/modules/crm/src/views/dashlets/opportunities-by-lead-source. js as an example.

      Finally, you need to add /custom/Espo/Custom/Resources/metadata/dashlets/OpportunitiesByLeadStatus.json using the files you can find in /application/Espo/Modules/Crm/Resources/metadata/dashlets/ as examples​.

      In your case, you should use Lead scope and file names instead of Opportunity.
      Last edited by Aleksey; 12-08-2022, 10:18 AM.

      Comment

      Working...
      X