Hello All, I am new to ESPOCRM, i got an requirement that the Phone number / Email should be HIDDEN or LEAVE BLANK in the contact list view if that phone number / email is not created by the current user.
phone.js
console.log(this.getUser()); // I get the current user ID here // BUT how to get created user.
phone.js
Code:
data: function () { var phoneNumberData; if (this.mode == 'edit') { phoneNumberData = Espo.Utils.cloneDeep(this.model.get(this.dataFieldName)); if (this.model.isNew() || !this.model.get(this.name)) { if (!phoneNumberData || !phoneNumberData.length) { phoneNumberData = [{ phoneNumber: this.model.get(this.name) || '', primary: true, type: this.defaultType }]; } } } else { phoneNumberData = this.model.get(this.dataFieldName) || false; } if ((!phoneNumberData || phoneNumberData.length === 0) && this.model.get(this.name)) { phoneNumberData = [{ phoneNumber: this.model.get(this.name), primary: true, primary: true, type: this.defaultType }]; } return _.extend({ phoneNumberData: phoneNumberData, doNotCall: this.model.get('doNotCall') }, Dep.prototype.data.call(this)); },
Comment