I am reading documentation for creating custom views at: https://www.espocrm.com/documentatio.../custom-views/
Can built in entity types have their views overridden? Or is this for Custom entities only?
What is the difference between views and recordViews?
I tried to override detail view of the Contact entity as follows
Following instructions I created file:
The I created following file:
Then I created following file:
By
And adding a minor "hellow world" text at the beginning of the first div.
In admin I rebuilt the crm.
I am not seeing the hello world in contact entity record detail page.
What am I missing here?
Can built in entity types have their views overridden? Or is this for Custom entities only?
What is the difference between views and recordViews?
I tried to override detail view of the Contact entity as follows
Following instructions I created file:
custom/Espo/Custom/Resources/metadata/clientDefs/Contact.json
Code:
{ "recordViews": { "detail": "custom:views/contact/record/detail" } }
client/custom/src/views/contact/record/detail.js
Code:
Espo.define('custom:views/contact/record/detail', 'views/record/detail', function (Dep) { return Dep.extend({ template: 'custom:views/contact/record/detail', setup: function () { Dep.prototype.setup.call(this); }, afterRender: function () { Dep.prototype.afterRender.call(this); } }); });
Then I created following file:
client/custom/res/templates/contact/record/detail.tpl
cp client/res/templates/record/detail.tpl client/custom/res/templates/contact/record/detail.tpl
In admin I rebuilt the crm.
I am not seeing the hello world in contact entity record detail page.
What am I missing here?
Comment