Enabling pessimistic record locking without initiating an action

You can enable pessimistic record locking without initiating an action.

About this task

To enable pessimistic record locking without initiating an action, you add a record script to the desired record type. When the record is locked in this manner, the lock is not automatically removed because there is no action on the record. Therefore, your schema should provide a corresponding Unlock_Record_Script_Alias action. A Perl example of an Unlock script is provided below.

Procedure

To enable pessimistic record locking without initiating an action:
  1. Check out the schema and select the desired record type.
  2. Expand Record Scripts and add a new record script named Lock that calls the LockRecord API method.
    In Perl, use the following statement:

    $entity->LockRecord (0);

  3. Add a new RECORD_SCRIPT_ALIAS action named Lock.
  4. Test the schema to ensure that pessimistic record locking for that record type is working.
  5. Check in the schema.
  6. Upgrade the user database.