HTML Code:
this.getCollectionFactory().create('Subscription', (newCollection) => { this.collection = collection; this.newcollection = newCollection; ..... // some where conditions, should return lets say 40 records this.newcollection.fetch().then((response) => { //This response has 2 things, list and total. the list is an object of 20 records as arrays and the total displays 40 const responseData = response; let entityIdList = responseData.list.map(item => item.entityId); this.whereCondition = [{.....}]; // using entityIdList in whereCondition this.collection.where = this.whereCondition; Espo.Ui.notify(this.translate('pleaseWait', 'messages')); return this.collection.fetch() // because whereCondition has only 20 records, it displays only those }).then(() => { Espo.Ui.notify(false); }); }, this);
Is there any other way to get the fetched data or get all the records via response?
Comment