How to make record readonly based on an attribute's value

This entry is part of the Conditional Expressions HowTo.

A very typical customization task is to make readonly some records of a specific table based on the value of an attribute.
For example you may wish prevent the editing of purchase orders that have a total costs higher than 1000$ for a specific group. Here is a small tutorial about how you can achieve this.

Open Administration - Conditional Expression Manager application and create the following conditional expression:

  • Condition: POCOST
  • Description: Total cost is more than 1000
  • Type: EXPRESSION
  • Expression: totalcost>1000



Now go to the Security - Security Groups application. Choose the desired group and open the Data Restrictions tab.
Create the following Object Restriction:

  • Object: PO
  • Type: READONLY
  • Reevaluate: true
  • Condition: POCOST


If you now logon with a user belonging to the chosen group and open the Purchase Orders application you will see that POs with a total cost of more than 1000 cannot be modified.

Comments