Report section not working after extending sugar endpoint ReportsExportApi

Viewed 57

Report section not working after extending sugar endpoint ReportsExportApi.

Getting error: "Export Type Does Not Exists".

My code is:

require_once('modules/Reports/Exporters/ReportExporter.php');
require_once('modules/Reports/templates/templates_export.php');
use Sugarcrm\Sugarcrm\modules\Reports\Exporters\ReportExporter;

class CustomReportsExportApi extends ReportsExportApi {
    // how long the cache is ok, in minutes
    private $cacheLength = 10;

    public function registerApiRest() {
         return parent::registerApiRest();  
    }

   protected function exportJson(ServiceBase $api, SugarBean $report)
    {
      //currently no code here
   }

} //class close ```

check below screenshot

0 Answers
Related