Hi,
Im trying to implement some custom action (like massAction) on elements selected in Entity list view
I my case during debugging this.recordView.checkedList is underfined in browser, however the check-marks are in place in UI.
How can I properly access the IDs of the selected entities ?
Thanks in advance!
PS. I tried to minic the logic in /record/list.jst but without much success...
Im trying to implement some custom action (like massAction) on elements selected in Entity list view
I my case during debugging this.recordView.checkedList is underfined in browser, however the check-marks are in place in UI.
How can I properly access the IDs of the selected entities ?
Code:
/client/custom/src/views/MY_EXTENSION/list.js
Code:
Espo.define('custom:views/MY_EXTENSION/list', 'views/list', function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.menu.actions.push({
name: 'printPDF',
label: 'Print PDF (on selected)',
action: 'printPDF',
acl: 'view'
});
},
actionPrintPDF: function () {
this.notify('Loading...');
var count = this.recordView.checkedList.length;
var idList = [];
for (var i in this.recordView.checkedList) {
idList.push(this.recordView.checkedList[i]);
};
ids_str = JSON.stringify( idList );
window.location = '?entryPoint=PDF&mode=many&ids=' + ids_str;
}
});
});
PS. I tried to minic the logic in /record/list.jst but without much success...

Comment