diff --git a/client/src/views/record/panels/default-side.js b/client/src/views/record/panels/default-side.js index 166f261cfd..463a1cad72 100644 --- a/client/src/views/record/panels/default-side.js +++ b/client/src/views/record/panels/default-side.js @@ -94,6 +94,16 @@ Espo.define('views/record/panels/default-side', 'views/record/panels/side', func if (this.getMetadata().get(['scopes', this.model.name ,'stream']) && !this.getUser().isPortal()) { this.createField('followers', 'views/fields/followers', null, null, true); + this.controlFollowersField(); + this.listenTo(this.model, 'change:followersIds', this.controlFollowersField, this); + } + }, + + controlFollowersField: function () { + if (this.model.get('followersIds') && this.model.get('followersIds').length) { + this.recordViewObject.showField('followers'); + } else { + this.recordViewObject.hideField('followers'); } } });