return TRUE if the record is locked.
The <TBL>.IS_RECORD_LOCKED() method returns .T. (TRUE) if the current record is locked (i.e. another user or session has the record in change mode). Using the <TBL>.IS_RECORD_LOCKED() method is easy and fast, in large part because Alpha Anywhere no longer needs to make several attempts to get a lock on a record before reporting an error.
This script checks if the current record is locked before making a change.
dim tbl as P tbl = table.current() status = tbl.is_record_locked() if (.not. status) then tbl.change_begin() tbl.field1 = var1 tbl.change_end(.T.) else ui_msg_box("Error", "Record locked by another user") end if