by eggsurplus

Control what your users can access and save time, money, and frustrations. Lock down sensitive data in SugarCRM or SuiteCRM to specific groups or teams. Supports unlimited assigned users, unlimited group assignments to records, custom layouts for each group, login/sudo capabilities and much more.

Cancel at any time!
Free Trial

#1030 - Best Method to Make a Record Read Only Based Upon a Dropdown Field Value Editable by Role?

Closed General Question created by donkennedy 4 years ago

I've scoured many forums and founds a few ways to code this, but was wondering if using SecuritySuite would be easier.

Here is the problem.

I'm using AOS Invoices. When the invoice is completed by the field employee, it is then ready to be reviewed by the office administrator before being exported into QuickBooks. Once that invoice is exported, we obviously don't want users to be able to edit it, hence the "read only state."

I envision a dropdown menu that only a user-role like "Admin" would have the privilege to edit. At which time they could place that invoice in an "archived" status, making the record "read only." Should there need to be a correction to that invoice after the fact, those with Admin rights could still edit the invoice record.

What would be the best way to accomplish this?

  1. eggsurplus member avatar

    eggsurplus Provider Affiliate

    4 years ago

    The best way to implement this is via a custom check in the view.edit.php. Redirect to the detail view if it should be read only depending on the current user. SecuritySuite doesn't do anything around this need. Sorry!

  2. donkennedy member avatar

    donkennedy

    4 years ago

    Thanks Jason... I appreciate the quick response!

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
Rating
  • "No brainer. I have purchased it for two production installations and not regretted it."

    Read More Reviews

Keep up to date on the latest additions

We'll send you an email every month with handpicked add-ons, reviews, tricks and tips. Don't worry, we hate spam as much as you do.