Code:
[Error] Unhandled Promise Rejection: Error: Collection has not been injected into views/record/list view. setup (espo-main.js:35:47299) _initialize (espo.js:17:210877) prepare (espo.js:17:226973) (anonymous function) (espo.js:17:226939) _getViewClass (espo.js:17:227297) create (espo.js:17:226841) (anonymous function) (espo.js:17:218606) Promise createView (espo.js:17:218448) setup (my-dialog.js:53) _initialize (espo.js:17:210877) prepare (espo.js:17:226973) (anonymous function) (espo.js:17:226939) (anonymous function) (espo.js:17:227381) forEach _executeLoadCallback (espo.js:6:202) _defineProceed (espo.js:6:752) (anonymous function) (espo.js:6:506) (anonymous function) (espo.js:6:1089) _load (espo.js:6:3163) (anonymous function) (espo.js:6:1012) forEach require (espo.js:6:997) define (espo.js:6:475) (anonymous function) (espo.js:6:7556) anonymous (my-dialog.js:3) _execute (espo.js:6) _handleResponseText (espo.js:6:5760) (anonymous function) (espo.js:6:5441)
Code:
this.createView('record', 'views/record/list', { collection: this.wait(this.loadCollection()) , type: 'listSmall', });
Code:
async loadCollection() { this.collection = await this.getCollectionFactory().create('User'); await this.collection.fetch(); }
Comment