Search code examples
javascriptlistmetadatasugarcrmdashboard

Getting list of rows of dashlets on current dashboard in SugarCRM 8.0.0


In Sugar 7.8.2, we were able to get a list of the rows (of dashlets) displayed on the current dashboard from App.controller.layout.model.attributes.metadata.components[0].rows.

In Sugar 8.0.0, metadata can no longer be accessed from App.controller.layout.model.attributes.

I've been looking through App using Chrome's DevTools console and am yet to come up with anything similar. Are there other ways to reach a list such as this?


Solution

  • If I'm not mistaken you can receive the rows of the current Dashboard model like this:

    App.controller.context.get("model").get("metadata").components[0].rows
    

    Can also be written as:

    App.controller.context.attributes.model.attributes.metadata.components[0].rows