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:
- Check out the schema and select the desired record type.
- 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);
- Add a new RECORD_SCRIPT_ALIAS action
named Lock.
- Test the schema to ensure that pessimistic record locking
for that record type is working.
- Check in the schema.
- Upgrade the user database.