Continuing the “Real-World” theme from last week (click here), I wanted to cover another real-world Acumatica situation. This question came to me through the Contact page here on the blog (click here). That’s right, this came from a person who is actually using Acumatica at their company! Here’s the question and a solution. I say a solution because I’m sure there is more than one way to tackle this.
Note: I’ll keep this shorter than usual because I’m writing this in an empty living room, tired from a long evening of packing. 90% of our stuff is in the moving van that is currently sitting in our driveway. We’ll load up the remaining 10% in the morning and head to our new house in Columbus (click here).
How do I prevent users from changing the status of a customer?
Basically what we want to do is make the following field read-only for certain users.
In order to do this, we need to apply the methodology used in the Field Security post from this past March (click here). First we’ll create a new User Role. Then we can create a new user and give them access to our new User Role. This way we can login as that user to prove that things are working as intended.
- Create a new User Role using the User Roles (SM201005) form.
- Create a new User using the Users (SM201010) form and assign the User to the User Role that we just created.
- Then we need to use the Access Rights By Role (SM201025) form to assign permissions to this new role/user. We have to drill all the way into the list of fields since we want to set permissions at the field level. Don’t forget that we first assign permissions to the screen, then permissions to the DAC (Data Access Class), then permissions to the individual field. It’s easy to get confused at the second step, the DAC. Here are three separate screenshots showing the permissions needed at each level.
- Now that we’ve set the permissions (they key one being View Only on the Status field), we can login as our user and try things out. Just go back to the Users (SM201010) form, pull up MyNewUser, and click the Log in As User button.
- Now we can see that our new user only has access to the Customers (AR303000) form and the Status field is read-only which is what we wanted.