Lock and unlock records and tables
- Last UpdatedApr 08, 2026
- 1 minute read
When locking records and tables, you must ensure that they are unlocked for normal code execution and for when exceptions occur. You can achieve this locking flexibility with a try\catch\finally block, but the preferred method is to use "using" statements. These statements ensure that the system successfully calls for the disposal of a record or table object, which in turn releases the locks automatically once the object goes out of scope.
For more information, see Read a record and Update a record.