A record lock can be acquired by manually performing the following actions:
Session-wide locks are better suited to data integrity than manual locks because it locks records as they are read from disk. A manual record lock can only be applied after the record has been read, manual locks leave a small window of opportunity for the record be modified or deleted by another thread before the record lock is acquired.
Release a record lock by calling CTRecord.UnlockRecord() or by calling CTRecord.LockRecord() with LOCK_MODE.FREE_LOCK mode.