Hello,
In quotes, I have one boolean field master.
I want to display in list view, only those quotes with master=1.
I tried like this in list.js-> buildRow
if (model.name == 'Quote') {
if (model.get("master") == 1) {
this.rowList.push(key);
this.getInternalLayout(function (internalLayout) {
internalLayout = Espo.Utils.cloneDeep(internalLayout);
this.prepareInternalLayout(internalLayout, model);
this.createView(key, 'views/base', {
model: model,
acl: {
edit: this.getAcl().checkModel(model, 'edit')
},
el: this.options.el + ' .list-row[data-id="' + key + '"]',
optionsToPass: ['acl'],
noCache: true,
_layout: {
type: this._internalLayoutType,
layout: internalLayout
},
name: this.type + '-' + model.name
}, callback);
}.bind(this), model);
}
else {
callback();
}
}
It is working,but the number of rows is not correct.
Or any other way is there other than filter.
Thanks in advance.
In quotes, I have one boolean field master.
I want to display in list view, only those quotes with master=1.
I tried like this in list.js-> buildRow
if (model.name == 'Quote') {
if (model.get("master") == 1) {
this.rowList.push(key);
this.getInternalLayout(function (internalLayout) {
internalLayout = Espo.Utils.cloneDeep(internalLayout);
this.prepareInternalLayout(internalLayout, model);
this.createView(key, 'views/base', {
model: model,
acl: {
edit: this.getAcl().checkModel(model, 'edit')
},
el: this.options.el + ' .list-row[data-id="' + key + '"]',
optionsToPass: ['acl'],
noCache: true,
_layout: {
type: this._internalLayoutType,
layout: internalLayout
},
name: this.type + '-' + model.name
}, callback);
}.bind(this), model);
}
else {
callback();
}
}
It is working,but the number of rows is not correct.
Or any other way is there other than filter.
Thanks in advance.
Comment