Hello,
I created a custom field type in the same way as phone, but contains 3 column values.
It is working perfect with detail and edit views, But I need to display all the values of the field in list view also.
Normally it is not displayed but when I click view and comes back to the list view it is displayed. And on refresh it goes again
data: function () {
var listItemData;
if (this.mode == 'edit') {
listItemData = Espo.Utils.cloneDeep(this.model.get(this.dataField Name));
if (this.model.isNew() || !this.model.get(this.name)) {
if (!listItemData || !listItemData.length) {
listItemData = [{
description: this.model.get(this.description) || '',
unit: this.defaultType || '',
unitPrice: this.model.get(this.unitPrice) || ''
}];
}
}
} else {
listItemData = this.model.get(this.dataFieldName);
}
return _.extend({
listItemData: listItemData
}, Dep.prototype.data.call(this));
},
Can anyone help me with this?
I am really stuck.
Thanks in advance.
I created a custom field type in the same way as phone, but contains 3 column values.
It is working perfect with detail and edit views, But I need to display all the values of the field in list view also.
Normally it is not displayed but when I click view and comes back to the list view it is displayed. And on refresh it goes again
data: function () {
var listItemData;
if (this.mode == 'edit') {
listItemData = Espo.Utils.cloneDeep(this.model.get(this.dataField Name));
if (this.model.isNew() || !this.model.get(this.name)) {
if (!listItemData || !listItemData.length) {
listItemData = [{
description: this.model.get(this.description) || '',
unit: this.defaultType || '',
unitPrice: this.model.get(this.unitPrice) || ''
}];
}
}
} else {
listItemData = this.model.get(this.dataFieldName);
}
return _.extend({
listItemData: listItemData
}, Dep.prototype.data.call(this));
},
Can anyone help me with this?
I am really stuck.
Thanks in advance.
Comment