Announcement

Collapse
No announcement yet.

make panel only visible if current user is assigned user (account)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • make panel only visible if current user is assigned user (account)

    Hello,

    i have a question and i hope someone can help me. i would like to make a panel visible only if the current user who is logged in is the same as the assigned user of the account. how can i do this. I Try ifThenElse(assignedUser.name==assignedUserName, controlfield=1, controlfield=null); in the entitymanager for accounts ...and then i make the panel visible if controlfield is 1... The controlfield is a boolfield. thank you

    Best regards
    Last edited by Mastelui; 09-24-2018, 09:51 AM.

  • #2
    this is better to implement with a development
    https://www.espocrm.com/documentatio.../custom-views/

    override afterRender method
    hidePanel(panelName);
    if (this.model.get('assignedUserId') == this.getUser().id) {
    showPanel(panelName);
    }
    Job Offers and Requests

    Find Developer
    Find Customer

    Comment


    • #3

      Thank you so much tanya,

      i use

      if (this.model.get('assignedUserId') != this.getUser().id) {

      this.$el.find('.field[data-name="xxx"]').addClass("hidden");

      }


      but now i have a question about user roles. can i make the field visible if the logged-in user are in a special role group.

      Thank you for your support :-)

      Comment


      • #4
        you can hide fields with Role Manager.
        Administration > Roles > role > Field Level
        Job Offers and Requests

        Find Developer
        Find Customer

        Comment

        Working...
        X