dashlet for contacts focus dashboard

We have a custom view for contacts which we have set up with a controller and templates to show a read-only "report" for the contact.

We added an action button to the record view to load the custom view. This is working OK.

Now we would like to add a dashlet to the Contacts Focus Dashboard which shows this custom "report" view.

We already have a standard "record view" dashlet on the dashboard.

We have tried making a very simple custom dashlet, specifying the 'Dashlet' plugin for the controller.

The custom dashlet appears in the list of dashlets when we try to ADD DASHLET to the focus dashboard.

However, when we CLICK the dashlet name to add it, the debugger pauses at EXCEPTION at

include\javascript\sugar7\plugins\Dashlet.js
in the "init" handler 
onAttach: function () {
                this.on("init", function () {
                    this.dashletConfig = app.metadata.getView(this.module, this.name);
                    this.dashModel = this.layout.context.get('model');
                    ...
                }
                ...
                }
this.layout is UNDEFINED
Can I define the layout somewhere?
If so, where?
Maybe I need to do this differently?
If so, how?
Parents
  • We tried following

     Creating a "Hello World" Dashlet for Sugar 7 

    to add the custom dashlet under /custom/client/base/views/

    But the dashlet DID NOT appear in the list when we ADD DASHLET.

    When we moved to /custom/modules/Contacts/client/base/views

    Then the dashlset DOES appear in the list, but we get the EXCEPTION as above.

    We have another custom dashlet which works OK on the HOME dashboard.

    This too is in the list, and also gives the EXCEPTION (we don't need this dashlet to work here though)

    Maybe dashlets on the focus dashboards need to work differently to dashlets elsewhere?

Reply
  • We tried following

     Creating a "Hello World" Dashlet for Sugar 7 

    to add the custom dashlet under /custom/client/base/views/

    But the dashlet DID NOT appear in the list when we ADD DASHLET.

    When we moved to /custom/modules/Contacts/client/base/views

    Then the dashlset DOES appear in the list, but we get the EXCEPTION as above.

    We have another custom dashlet which works OK on the HOME dashboard.

    This too is in the list, and also gives the EXCEPTION (we don't need this dashlet to work here though)

    Maybe dashlets on the focus dashboards need to work differently to dashlets elsewhere?

Children