Good night all
I have an entity called "Categorías de producto" that is related to another entity "Fabricante" in the following form Categoría de producto Many-to-One Fabricante.
I am testing with the following code. This code is in the following path "client/src/handlers/select-related/same-fabricante-many.js" and is configured for a field of the opportunity entity
The result is as follows:
As you can see, the filter does it correctly but the names are not shown in the place they should go.
Doing a little research I came to the conclusion that if the relationship between "Categorias de producto" and "Fabricante" was Many-to-Many, the names would be displayed correctly, changing the advanced.fabricante to advanced.fabricantes due to the new relationship.
I think that in data there must be a configuration so that the names are displayed correctly with the first relationship between the two entities.
Please, if anyone could guide me or give me any information about it, I would be very grateful.
I have an entity called "Categorías de producto" that is related to another entity "Fabricante" in the following form Categoría de producto Many-to-One Fabricante.
I am testing with the following code. This code is in the following path "client/src/handlers/select-related/same-fabricante-many.js" and is configured for a field of the opportunity entity
Code:
define('handlers/select-related/same-fabricante-many', ['handlers/select-related'], Dep => { return class extends Dep { getFilters(model) { let advanced = {}; let fabricantesIds = ['65a66c52349517ee9', '65a66c67bd94f491d']; let nameHash = { '65a66c52349517ee9': "HPE", '65a66c67bd94f491d': "Fortinet", }; advanced.fabricante = { attribute: 'fabricanteId', type: 'in', value: fabricantesIds, data: { type: 'isOneOf', nameHash: nameHash, }, }; return Promise.resolve({ advanced: advanced, }); } } });
As you can see, the filter does it correctly but the names are not shown in the place they should go.
Doing a little research I came to the conclusion that if the relationship between "Categorias de producto" and "Fabricante" was Many-to-Many, the names would be displayed correctly, changing the advanced.fabricante to advanced.fabricantes due to the new relationship.
I think that in data there must be a configuration so that the names are displayed correctly with the first relationship between the two entities.
Please, if anyone could guide me or give me any information about it, I would be very grateful.
Comment