I'm trying to get the list of cases followed by the user. I made a Espo.Ajax.getRequest(), which returns me a list of cases. I want it to be displayed in the Case list view.
I tried passing caseids in this.collection.where, it works, but only if the count of ids is less. If the list of caseIds is huge it throws Error 414, saying Request URI is too long.
Is there any way we could work with collections without getting 414, or somehow display the ajax response directly on the UI.
PHP Code:
updateCollection: function () {
this.collection.abortLastFetch();
this.collection.reset();
this.collection.where = this.searchManager.getWhere();
// if the case filter selected is "follower"
if (this.searchManager.data.advanced.follower) {
Espo.Ajax.getRequest('Subscription/action/Followers', {
ids: this.searchManager.data.advanced.follower.value,
type: this.searchManager.data.advanced.follower.type
}).then(response => {
//return response;
});
}
Espo.Ui.notify(this.translate('pleaseWait', 'messages'));
this.collection.fetch().then(function () {
Espo.Ui.notify(false);
});
},
I tried passing caseids in this.collection.where, it works, but only if the count of ids is less. If the list of caseIds is huge it throws Error 414, saying Request URI is too long.
Is there any way we could work with collections without getting 414, or somehow display the ajax response directly on the UI.
Comment