Table of Contents

, , , , ,

PROTECT

This action protects a business object or its attribute from access by all or specified users. There are several variations of this action:

Syntax

protects business object or attribute from access by users operating at the specified access level(s)

protects business object or attribute from all users

protects business object or attribute from all users except those operating at the specified access level(s)

Example

IF Transaction.State='APPLIED' THEN 
  PROTECT Transaction FROM ALL 

do not allow any changes to a transaction if it is in the Applied state

IF Transaction.State='APPLIED' THEN 
  PROTECT Transaction FROM ALL EXCEPT Administrator 
IF Account.State='CLOSED' THEN 
  PROTECT Account.Name FROM User 

If an attribute of a business object is protected it is read-only on forms of this business object. If the entire object is protected all its attributes are read-only.

Notes:

IF Account.STATE <> 'NEW' THEN 
  PROTECT Account.Balance FROM ALL EXCEPT System  

In this case users will not be able to change the account balance when the state of the account is not new, however, it is possible to configure process rules that change the account balance.

PROTECT Transaction.Account.State FROM ALL 

is invalid.

IF Transaction.State='APPLIED' THEN 
  READ PROTECT Transaction FROM ALL 

When a business object is “read protected” the instances that match protection condition will not be read from the system. If an attribute is “read protected” its value will not be visible on any forms and cannot be changed.