Limiting access to field for current user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JosNas
    Member
    • Sep 2021
    • 97

    Limiting access to field for current user

    Hello, I have 3 Boolean fields (checkboxes) called 'Approved' that become sequentially visible after checking them one after the other (after checking 1st checkbox, the second becomes visible, then after the second is checked, the 3rd becomes visible) in a custom entity "Proposed Member".

    What I'm trying to achieve are 2 conditions:
    1) Not allowing the user who created the record (Proposed Member) to see and click/check any of the Approved checkboxes (he'll be approving his own proposal which is not right)
    2) Not allowing the user who approved (clicked one of the checkboxes) of seeing and approving the checkbox that appears after approving the one before.

    Note: Only the users belonging to team 'Committee' can see this panel/those 3 checkboxes. I just don't want the users mentioned above (in that team) of doing the approvals (as mentioned).

    Is there any way I can implement this? I also have the workflow package if needed.
    Thanks in advance.
    Last edited by JosNas; 10-28-2021, 07:51 AM.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1603

    #2
    This should work by using the conditional field setting, making field write protected, if not a certain user.

    Comment


    • JosNas
      JosNas commented
      Editing a comment
      yes exactly but this is what I'm trying to know how to implement
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #3
    For example: espocrm.com/#Admin/fieldManager/scope=Contact&field=firstName

    Look at Dynamic Logic at the bottom

    Comment


    • JosNas
      JosNas commented
      Editing a comment
      the dynamic logic is empty in the Contact's firstName field you sent
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1603

    #4
    You must set the conditions in your bool field.

    Comment


    • esforim
      esforim commented
      Editing a comment
      Yes, click those + or Add button... then create your setting.

      Of course it will be empty because you haven't created anything yet.
  • JosNas
    Member
    • Sep 2021
    • 97

    #5
    esforim I get it and I think I found a solution that I will share as soon as it works. But I think there's a bug preventing me from doing that. I am setting the condition to make the field not visible once it gets checked, but it is becoming invisible as soon as I check it without clicking update, so its condition is not updating from unchecked to checked but it is still becoming invisible.

    Comment

    • shalmaxb
      Senior Member
      • Mar 2015
      • 1603

      #6
      Yes, it works so by design. In edit mode, if you mark the field, it will give the reaction immediately, only it is not saved yet. If you cancel editing, you will see, that it will not be marked.
      I guess, that has to be this way, because, if your user marks the field, you won`t want him to be able to yet use the field, that you don`t want to be visible.
      If you want to keep that field visible, but don`t want to have it editable, you set the condition for write protected. Condition would be:

      make field x write protected, when field y is marked.
      Last edited by shalmaxb; 11-01-2021, 09:45 AM.

      Comment


      • JosNas
        JosNas commented
        Editing a comment
        right. much appreciated shalmaxb
    Working...