Hi,
We are using 12.3 of cloud sugarcrm. We have created many advance report. Want to create dashlet with Advance report on it and show it in dashboard.
Any advice? Thanks in advance
Hi,
We are using 12.3 of cloud sugarcrm. We have created many advance report. Want to create dashlet with Advance report on it and show it in dashboard.
Any advice? Thanks in advance
Hi Sudipta,
There is not a way in the core product to represent advanced reports in dashlets, and that is not a feature I anticipate Sugar developing in the near future.
Advanced Reports is not a feature with an active pipeline for development in Sugar. It remains in the product as a means of providing users a way to run direct database queries to SELECT rows from the database, but it's development pre-dates the modern user interface and it is not integrated into other features of Sugar.
Idea 70978 asks for dashlets for advanced reports, which you can view in the support portal at portal.sugarondemand.com/
Regards,
Patrick McQueen
Director, SugarCRM Support
Hi Patrick,
thanks for your feedback. I am trying to create custom dashlet and show the advance report result to this dashlet. By following this article https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/how-to-build-an-external-api-dashlet?tempkey=e1bb2e88-9842-447c-ae75-e0873240e516
I can able to create custom dashlet. But not sure how to get advance report result in the php file.
my files looks like below
<?php
/**
* Metadata for the wage-stream-access dashlet view
*/
$viewdefs['base']['view']['wage-stream-access'] = array(
'dashlets' => array(
array(
'label' => 'wage-stream-access',
'description' => 'Lists wage-stream-access report',
'config' => array(),
'preview' => array(),
'filter' => array(
'module' => array(
'Home',
'Accounts',
'Leads',
),
'view' => array(
'record',
)
)
),
),
);
/**
* wage-stream-access dashlet controller
**/
({
plugins: ['Dashlet','CssLoader'],
// path to our custom css we wish to load for this dashlet
css: ["custom/include/css/wage-stream-access.css"],
// initialize the data variable
wages: undefined,
_retrieveData: function() {
this.wages =
[
{
"category": "Open Opportunity",
"id": "ebf6b2c6-1e1c-11ea-8e43-064a1b4e8da6",
"account": "Limited",
"opportunityid": "bd91cd8c-c83a-11ed-8ec5-02d5713723ce",
"opportunities": " - wageshf Cloud",
"sales_stage": "1. Qualification",
"quoteid": "50c4279e-c83b-11ed-9836-06f590b7be66",
"quote": " - wageshf Cloud - 2023-03-22",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 550
},
{
"category": "Open Opportunity",
"id": "8df02298-3aa5-11ea-b469-023d8f5f07e0",
"account": "Accor Aus and NZ Hosp Pty Ltd - PULLMAN & MERCURE ALBERT PARK Melbourne",
"opportunityid": "bac86768-abfd-11ed-b3bd-06f590b7be66",
"opportunities": "Pullman Albert Park Melbourne - wageshf Onboarding",
"sales_stage": "1. Qualification",
"quoteid": "609bcdc2-ac05-11ed-a554-06f590b7be66",
"quote": "Pullman Albert Park Melbourne - wageshf Onboarding - 2023-02-14",
"opportunitytype": "Upsell new contract",
"name": "Streamed Wage Access",
"quantity": 200
},
{
"category": "Closed Won",
"id": "50c53b66-6eae-11ed-ad6d-023d8f5f07e0",
"account": "ssss",
"opportunityid": "4580da1a-37b0-11ed-bad5-023d8f5f07e0",
"opportunities": " Retail - 1000 Employees",
"sales_stage": "Closed Won",
"quoteid": "82ceb68a-386e-11ed-b255-06f590b7be66",
"quote": " Retail - 1000 Employees - 2022-09-20",
"opportunitytype": "New SaaS",
"name": "Streamed Wage Access",
"quantity": 1000
},
{
"category": "Open Opportunity",
"id": "a4559c7a-3aa5-11ea-b4fb-023d8f5f07e0",
"account": "sss",
"opportunityid": "fe0de554-75b9-11ed-be28-06f590b7be66",
"opportunities": "- HF cloud migration",
"sales_stage": "4. Proposal",
"quoteid": "7871f826-75ba-11ed-b7e6-024d04043908",
"quote": " - HF cloud migration - 2022-12-07",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 520
},
{
"category": "Open Opportunity",
"id": "1f97c912-3aa6-11ea-a191-023d8f5f07e0",
"account": "fdfd",
"opportunityid": "ca3a30d8-3f7d-11ed-a916-024d04043908",
"opportunities": " Care - wageshf Cloud",
"sales_stage": "1. Qualification",
"quoteid": "8029b7be-3f7f-11ed-b2cb-064a1b4e8da6",
"quote": " Care - wageshf Cloud - 2022-09-29",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 150
},
{
"category": "Closed Lost",
"id": "178674c2-3ab4-11ea-ba3d-06f590b7be66",
"account": "ggg",
"opportunityid": "f21a3378-03f5-11ed-bae0-02d5713723ce",
"opportunities": " - Wagestream",
"sales_stage": "Closed Lost",
"quoteid": "37e69982-03f6-11ed-b75f-06f590b7be66",
"quote": " - Wagestream - 2022-07-15",
"opportunitytype": "Upsell",
"name": "Streamed Wage Access",
"quantity": 5240
},
{
"category": "Open Opportunity",
"id": "115c2ffa-d15f-11ea-b93c-064a1b4e8da6",
"account": "ghgfh",
"opportunityid": "c0fcb60a-9de0-11ed-be86-024d04043908",
"opportunities": " Entertainment - 150 Emps",
"sales_stage": "4. Proposal",
"quoteid": "2dc6b540-a068-11ed-a4e8-02d5713723ce",
"quote": "ntertainment - 150 Emps - 2023-01-30",
"opportunitytype": "New SaaS",
"name": "Streamed Wage Access",
"quantity": 150
},
{
"category": "Open Opportunity",
"id": "80f1a938-3aa8-11ea-9cfc-023d8f5f07e0",
"account": "nbmb",
"opportunityid": "af0fbf40-c69f-11ed-9ff3-023d8f5f07e0",
"opportunities": " Tree Expert - wageshf Cloud",
"sales_stage": "1. Qualification",
"quoteid": "db5f73ce-c69f-11ed-90bb-023d8f5f07e0",
"quote": " Tree Expert - wageshf Cloud - 2023-03-20",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 600
},
{
"category": "Closed Won",
"id": "ea2ec01c-3aac-11ea-a10d-06f590b7be66",
"account": "bvnvbn",
"opportunityid": "7d7cc50c-cd8d-11eb-b5da-02d5713723ce",
"opportunities": "ouncil MSA recontract",
"sales_stage": "Closed Won",
"quoteid": "ca2cf254-1e8c-11ed-9f87-024d04043908",
"quote": "Council MSA recontract - 2022-08-18",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 1620
},
{
"category": "Closed Lost",
"id": "26a68ef0-3aa6-11ea-af30-023d8f5f07e0",
"account": "nbm",
"opportunityid": "cbc92f8a-6570-11ed-9677-023d8f5f07e0",
"opportunities": " - Migration",
"sales_stage": "Closed Lost",
"quoteid": "c52d886e-6571-11ed-8d6e-023d8f5f07e0",
"quote": " - Migration - 2022-11-16",
"opportunitytype": "Migration",
"name": "Streamed Wage Access",
"quantity": 50
},
{
"category": "Closed Won",
"id": "3616c9c6-535e-11ed-9856-06f590b7be66",
"account": "hgj",
"opportunityid": "3816e59e-535e-11ed-b788-06f590b7be66",
"opportunities": "Care - 70 Emps",
"sales_stage": "Closed Won",
"quoteid": "393f93f4-5bd2-11ed-9bb8-024d04043908",
"quote": "- 70 Emps - 2022-11-04",
"opportunitytype": "New SaaS",
"name": "Streamed Wage Access",
"quantity": 70
}
];
},
initialize: function(options) {
this.wages = [];
// call the parent's (View's) initialize function
// passing options as an array
this._super('initialize', [options]);
this._retrieveData();
},
})
<div class="control-group dashlet-options">
<div class="controls controls-two btn-group-fit">
<div class="row-fluid">
<div class="">
<p>This is the internal header of our dashlet!!</p>
</div>
</div>
</div>
</div>
<div class="wage-access">
{{#if wages.length}}
{{#each wages}}
<div class="row-fluid wage-access">
{{#if [id]}}
<div class="dta_block wage-access_id"><span class="dta_lbl">ID:</span><span class="dta_val">{{[id]}}</span></div>
{{/if}}
{{#if [account]}}
<div class="dta_block wage-access_city"><span class="dta_lbl">Account:</span><span class="dta_val">{{[account]}}</span></div>
{{/if}}
{{#if [opportunities]}}
<div class="dta_block wage-access_state"><span class="dta_lbl">Opportunities:</span><span class="dta_val">{{[opportunities]}}</span></div>
{{/if}}
{{#if [sales_stage]}}
<div class="dta_block wage-access_url"><span class="dta_lbl">Sales Stage:</span><span class="dta_val">{{[sales_stage]}}</span></div>
{{/if}}
{{#if [opportunitytype]}}
<div class="dta_block wage-access_url"><span class="dta_lbl">Opportunity Type:</span><span class="dta_val">{{[opportunitytype]}}</span></div>
{{/if}}
{{#if [quote]}}
<div class="dta_block wage-access_url"><span class="dta_lbl">Quote:</span><span class="dta_val">{{[quote]}}</span></div>
{{/if}}
{{#if [quantity]}}
<div class="dta_block wage-access_url"><span class="dta_lbl">Quantity:</span><span class="dta_val">{{[quantity]}}</span></div>
{{/if}}
</div>
{{/each}}
{{/if}}
</div>
Any advice thanks