How to create a new side panel for an entity?
Collapse
X
-
Maybe this will help:
I have a "Property" entity that is linked to a "Tenancy" entity in a one-to-many relationship.
In "Property" detail view, a list of "Tenancies" is shown in a side panel, similar to the way "Tasks" can be displayed in side panel.
This is how I did it:
1) Add a custom side panel in the "Property" clientDefs file
@ custom/Espo/Custom/Resources/metadata/clientDefs/Tenancy.json
2) Add the custom side panel to the "Property" side panels detail layout fileCode:"sidePanels": { "detail": [ { "name": "tenancies", "label": "Tenancies", "view": "views/record/panels/relationship", "aclScope": "Tenancy" }, ...
@ custom/Espo/Custom/Resources/layouts/Property/sidePanelsDetail.json
3) I used the default relationship presentation inside the side panel, but to modify the data and presentation inside the side panel, you would need to create a custom view to replace "views/record/panels/relationship" (client/src/views/record/panels/relationship.js) and create a custom template to replace "record/panels/relationship" (client/res/templates/record/panels/relationship.tpl) called inside "views/record/panels/relationship".Code:{ "tenancies": { "index": 1 }, ...
See how it is done for Tasks at client/modules/crm/src/views/record/panels/tasks.js
CheersLast edited by telecastg; 03-25-2019, 04:10 PM.

Comment