I try replicate functional from this topic for custom entities:
When I try select Provider after selecting Provider Type, I don't see filters parametrs like this:
But results of filtering is true. What am I doing wrong?
/client/custom/src/view/service/fields/provider.js
/custom/Espo/Custom/Resources/metadata/entityDefs/Service.json
/custom/Espo/Custom/Resources/metadata/entityDefs/Provider.json
/custom/Espo/Custom/Resources/metadata/entityDefs/ProviderType.json
When I try select Provider after selecting Provider Type, I don't see filters parametrs like this:
But results of filtering is true. What am I doing wrong?
/client/custom/src/view/service/fields/provider.js
Code:
Espo.define('custom:views/service/fields/provider', 'views/fields/link', function (Dep) { return Dep.extend({ getSelectFilters: function () { if (this.model.get('providerTypeId')) { return { 'providerType': { type: 'equals', field: 'providerTypeId', value: this.model.get('providerTypeId'), valueName: this.model.get('providerTypeName') } }; } }, getCreateAttributes: function () { if (this.model.get('providerTypeId')) { return { providerTypeId: this.model.get('providerTypeId'), providerTypeName: this.model.get('providerTypeName') } } } }); });
Code:
{ "fields": { "providerType": { "type": "link" }, "provider": { "type": "link", "view": "custom:views/service/fields/provider" } } }
Code:
{ "fields": { "providerTypes": { "type": "linkMultiple", "layoutDetailDisabled": false, "layoutListDisabled": true, "layoutMassUpdateDisabled": false, "importDisabled": false, "noLoad": false, "isCustom": true }, "providerTypeId": { "type": "varchar", "where": { "=": "provider.id IN (SELECT provider_id FROM provider_provider_type WHERE deleted = 0 AND provider_type_id = {value})", "<>": "provider.id NOT IN (SELECT provider_id FROM provider_provider_type WHERE deleted = 0 AND provider_type_id = {value})", "IN": "provider.id IN (SELECT provider_id FROM provider_provider_type WHERE deleted = 0 AND provider_type_id IN {value})", "NOT IN": "provider.id NOT IN (SELECT provider_id FROM provider_provider_type WHERE deleted = 0 AND provider_type_id IN {value})", "IS NULL": "provider.provider_type_id IS NULL", "IS NOT NULL": "provider.provider_type_id IS NOT NULL" }, "disabled": true } }, "links": { "providerTypes": { "type": "hasMany", "relationName": "providerProviderType", "foreign": "providers", "entity": "ProviderType", "audited": false, "isCustom": true } } }
Code:
{ "fields": { "providers": { "type": "linkMultiple", "layoutDetailDisabled": true, "layoutListDisabled": true, "layoutMassUpdateDisabled": true, "importDisabled": true, "noLoad": true, "isCustom": true } }, "links": { "providers": { "type": "hasMany", "relationName": "providerProviderType", "foreign": "providerTypes", "entity": "Provider", "audited": false, "isCustom": true } } }