I run into this old posting while working on a new dashlet.
In case you haven't found a solution, I think that the problem is that you are missing a "expandedLayout" default value so Espo doesn't know what the layout of each record row should be like.
I tested the following code and is working fine:
custom/Espo/Custom/Resources/metadata/dashlets/KnowledgeBaseArticles.json
Code:
{ "view":"views/dashlets/abstract/record-list", "entityType": "KnowledgeBaseArticle", "options": { "fields": { "title": { "type": "varchar", "required": true }, "autorefreshInterval": { "type": "enumFloat", "options": [0, 0.5, 1, 2, 5, 10] }, "displayRecords": { "type": "enumInt", "options": [5,10] }, "expandedLayout": { "type": "base", "view": "views/dashlets/fields/records/expanded-layout" } }, "defaults": { "displayRecords": 5, "expandedLayout": { "rows": [ [ { "name": "name", "link": true } ], [ { "name": "status" }, { "name": "createdAt" } ] ] }, "searchData": { "primary": "usingThePortalArticles" } }, "layout": [ { "rows": [ [ {"name": "title"} ], [ {"name": "displayRecords"}, {"name": "autorefreshInterval"} ], [ {"name": "expandedLayout", "fullWidth": true} ] ] } ] } }
Code:
{ "dashlets": { "KnowledgeBaseArticles": "Knowledge Base Articles" } }
Leave a comment: