Limiting Permission to saving record

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a user who is in a role to create projects.  But he could only do so only for certain projects that meet a test.  At the moment I have a stores table where he has full access which is one to many with projects.  In projects table there is a field, say development type, which holds values which determine whether he could create a project.  How do I ensure that he could only save the project that meets certain conditions in Projects table?  I tried form rules but despite putting these in place, when testing for his role, I could create the project.  Is there a straight forward approach to administer these limitations?  

Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
A form rule should work

When the user is in the Role "Only allowed to create certain projects"

And any of the following are true

Project type is not allowed 1
Project type is not allowed 2

Abort the save with message:  sorry but you were not allowed to create projects of this type.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks.  I was working along similar lines but after making slight changes in the light of your comments, I could get the message even before the record creation occurs. So testing it as add project from stores table and then opening up the relevant form.  I will see if I could add a screen shot of my  rules for your review.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
I have attached a screen shot for your perusal.
So, are you now satisfied with the behavior?  It seems so. But this will not actually block the save.

You may want to Cooy the form rule and change that first line to
When the record is Saved,

and change the last action to Abort the save.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks a lot.  I think I know the reason why I could not do this earlier.  I was selecting multiple conditions and in that case you do not see the record condition. May be there should be an option under multiple conditions too.   Many thanks as usual.