Installation settings are global business rules with calculated names. Installation settings are calculated just before a record is displayed and facilitate dynamic determination of access and roles. Installation Settings permit the programmatic determination of a setting.

Installation settings controlling access to fields and records are:
  • CanRead()
  • CanWrite()
  • CanCreate()
  • CanDelete()

Functions can return true if access is permitted, false if not. No return value uses the permission calculated using roles. The function has access to the current record through the variable current code.

The name of the function checking the permission on a record is formed by prefixing the setting name with the record name:
record_nameCanRead()
Similarly, the permission on a field in a record is formed by prefixing the function name with the record name, underscore, and field name:
record_name_field_nameCanRead()
Naming examples:
function incidentCanWrite() {} //  can user write to this record?
 function incident_numberCanWrite() {}  // can user write to the number field?
This sample business rule restricts the writing of the name field in the sys_dictionary file when the entry exists:
  // the element name cannot be written unless this is a new record (not yet in database)
  function sys_dictionary_nameCanWrite() {
    if (current.isNewRecord())
      return; 

    return false;
  }