2

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

D Malan
  • 10,272
  • 3
  • 25
  • 50
Abasaheb Gaware
  • 509
  • 4
  • 13
  • sugarcrm community does not helped me – Abasaheb Gaware Jun 05 '20 at 07:30
  • 2
    Are you getting this message directly as you open up #Reports? Do you know which request generates the error? (use your browser’s network-tab to check). Sugar has a ”scoring” that it uses to figure out which endpoint to use when several are configured for the same path. I'm suspecting that as you use registerApiRest to call the parent, the content of parent::registerApiRest is given additional scoring as it's called from a custom class. Try to only override your intended endpoint to see if there's any difference. – ogge7 Jun 09 '20 at 12:09

0 Answers0