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.

Free 30 day trial
Try it Now

By clicking you consent to share your profile with the developer

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

Closed General Question created by donkennedy 7 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

    7 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


    7 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...
  • "Works really well, improves CE version greatly. Fantastic addon." - cmyatt

    Read More Reviews