When you view a Related List, by default it only shows the first five members. You can click the three dots and it will show more members in the side panel on the right.
In the sidebar, you can use the dropdown menu to the right of each member and choose 'Remove' to remove it from the related list.
If you try to remove an item which is not also in the truncated list in the main panel, an error is thrown.
Here we are using a Related List for a custom mailing list entity, but the error is in the default behaviour in client\src\views\modals\related-list.js, not our customisations:
We have found we can fix the error by changing actionRemoveRelated to:
But we are unsure if this is the 'correct' way to fix things.
EspoCRM version: 6.0.9, but we have tested with 7.2.7 and the error still occurs.
PHP version: 7.3, but we have tested with 7.4 and the error still occurs
In the sidebar, you can use the dropdown menu to the right of each member and choose 'Remove' to remove it from the related list.
If you try to remove an item which is not also in the truncated list in the main panel, an error is thrown.
Here we are using a Related List for a custom mailing list entity, but the error is in the default behaviour in client\src\views\modals\related-list.js, not our customisations:
We have found we can fix the error by changing actionRemoveRelated to:
Code:
actionRemoveRelated: function (data) { var id = data.id; this.confirm({ message: this.translate('removeRecordConfirmation', 'messages'), confirmText: this.translate('Remove'), }, () => { this.notify('Removing...'); Espo.Ajax.deleteRequest(this.collection.entityType +"/"+id).then(() => { this.notify('Removed', 'success'); this.collection.fetch(); this.model.trigger('after:unrelate'); this.model.trigger('after:unrelate:' + this.link); }); }); },
EspoCRM version: 6.0.9, but we have tested with 7.2.7 and the error still occurs.
PHP version: 7.3, but we have tested with 7.4 and the error still occurs
Comment