Reputation: 113
I need to edit a view in EspoCrm. Should i inherit it from excisting, or just edit? Used documentation, but nothing happens.
I added views and recordViews fields in custom/Espo/Custom/Resources/metadata/clientDefs/Contact.json
then created client/custom/src/views/Contact/record/detail.js
,
but it has no effect
Upvotes: 0
Views: 2686
Reputation: 156
Your custom/Espo/Custom/Resources/metadata/clientDefs/Contact.json
file has to contain such code
{
"recordViews": {
"detail": "custom:views/contact/record/detail"
}
}
Check if json is valid.
Rename your folder Contact to contact (lower case)
new path has to be client/custom/src/views/contact/record/detail.js
You need to inherit it from some class, 'view'
at least. But better is from 'crm:views/contact/record/detail'
, because you don't lose the main functionality. But it is not necessary. You can use general class 'views/record/detail'
as well.
In this case this file start with
Espo.define('custom:views/contact/record/detail', 'crm:views/contact/record/detail', function (Dep) {
Don't forget to rebuild EspoCRM in Administration.
Upvotes: 2