How add custom field in report scheduled window

Hello Developers,

I want to upgrade /modules/Reports/tpls/AddSchedule.tpl. and add one custom dropdown field and save value in database. Is there any way to upgrade this tpl file and save value in database.? 

  • There are several tasks to do in order to accomplish that:

    Create a script into custom/Extension/application/Ext/Utils/ with content like that:

    require_once 'custom/modules/Reports/schedule/CustomReportSchedule.php';
    require_once 'custom/include/SugarQueue/jobs/CustomSugarJobSendScheduledReport.php';

    Create a script into custom/Extension/application/Ext/TableDictionary/ with content like that:

    include('custom/metadata/report_schedulesMetaData.php');

    Inside the file custom/metadata/report_schedulesMetaData.php add the field.

    Inside the file custom/modules/Reports/schedule/CustomReportSchedule.php let the class CustomReportSchedule extends ReportSchedule and override the methods save_custom_schedule, getSchedulesToDeactivate, getInfo

    Inside the file custom/include/SugarQueue/jobs/CustomSugarJobSendScheduledReport.php let the class CustomSugarJobSendScheduledReport extends SugarJobSendScheduledReport and implements RunnableSchedulerJob and finally override the method run

    Create the file custom/modules/Reports/schedule/save_schedule.php in order to properly call the method save_custom_schedule at CustomReportSchedule.

    Create the files custom/modules/Reports/tpls/AddSchedule.tpl and custom/modules/Reports/views/view.schedule.php in order to properly display and manage the new field.

    Create the file custom/process/queue.php in order to modify how to save a scheduled report data into SugarJobQueue.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada