reports filter querystring

Our client has a "summary" report which lists revevant records.

They want us to add a link to each row to a "detail" report for that record: we would need to link to the REPORT URL and pass querystring values to pre-populate the filters.

Is this possible?

I have found the reports filter panel widget where the filter values are set.

I have found that the Reports record view is interpreting the query string as the LAYOUT parameter and so results in a BLANK page as there is no such layout, it should be using the same 'record' layout as per default.

I guess I need to add a custom route somewhere.

this talks about adding a route with "?" but Sugar seems to have a wrapper around the functionality used, so we would need to do something else.


    looking in include/javascript/sugar7.js

    I see the route for 'record'

    I have an existing custom/include/javascript/customRoutes.js that I can add to:

                    name: 'recordQS',
                    route: ':module/:id(/:action)?*querystring',
                    //callback: 'record'
                    callback: function(module, id, action, querystring) { /* like include/javascript/sugar7.js */
                        // FIXME: We shouldn't be calling private methods like this.
                        // Will be addressed in SC-2761.
                        if (!app.router._moduleExists(module)) {
                        app.router.record(module, id, action);

    Then REBUILD and the link to the REPORT with the query string shows the REPORT as hoped.



  • Now I would like to create a custom version of 

    If I add a file custom/modules/Reports/clients/base/views/report-runtime-filter-widget/report-runtime-filter-widget.js
    and try
         * run `SUGAR.App.view.views` in console to get list of available views
         * this is BaseReportsCustomReportRuntimeFilterWidgetView
         * when this runs, BaseReportsReportRuntimeFilterWidgetView has not been defined!
        /*extendsFrom: 'BaseReportsReportRuntimeFilterWidgetView',*/
        initialize: function(options) {
            this._super('initialize', [options]);
    console.log("custom ReportsReportRuntimeFilterWidget initialize");
    then the CONSOLE tells me 'BaseReportsReportRuntimeFilterWidgetView' is not defined to extend from!
    It seems that BaseReportsReportRuntimeFilterWidgetView is defined AFTER the CUSTOM files run!
    Is there a way to customise this?