Filter contacts field of call entity based on account
Collapse
X
-
I don't know. Please add yuri in your comment. He might know. Maybe you can make the search filter read-only field. -
Many thanks
this was helpful i have managed to get it done, one more thing i was thinking of can i disable the filter editing on that view, is there any property i can set to make filter not editable.
many thanks
Rabii -
Hi rabii ,
You will have to write custom code for this feature.
Check this:
https://github.com/espocrm/espocrm/b...ds/contacts.js
EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.
You need: getSelectFilters
You need override this function for your entity in custom
Write a javascript file in client/custom/src/views/project/fields/services.js with below code
Code:Espo.define('custom:views/project/fields/services', 'views/fields/link-multiple', function (Dep) { return Dep.extend({ getSelectFilters: function () { // Figure out the logic yourself }
Then you need to update your custom/Espo/Custom/Resources/metadata/entityDefs/Project.json
Code:{ "fields": { "services": { "type": "linkMultiple", "layoutMassUpdateDisabled": true, "view": "custom:views/project/fields/services" } } }Last edited by theBuzzyCoder; 08-09-2019, 04:04 PM.Leave a comment:
-
Filter contacts field of call entity based on account
Hi all,
i have created 3 entities : Clients - Services - Projects
- Client Has Many Projects
- Client Has Many Services
- Projects Has Many Services
I would want to create new project and once i choose the client for this projects then when selecting services for the projects i want to get only services of the client select for this projects , just like the existing relation between call - contacts and account. In the call entity when creating new call for a specific account then in the contacts field you can choose only contacts that belong to this current account. please see attached screenshot.
i hope someone can help.
Many thanks
Tags: None

Leave a comment: