lockcurrentrecord()

The lockcurrentrecord( function attempts to lock the current record, returns true if successful, false if failed.


Parameters

No parameters.


Description

This function attempts to lock the current record. It returns true if the record successfully locked, or false if the attempt failed (for example if the record is locked on another computer). Either way, the result is returned immediately, this function does not wait if the record cannot be locked.

if lockcurrentrecord()
    Quantity = Quantity-1
    unlockrecord
else
    message "This item is currently being edited by another user, please try again later."
endif

In addition to this function, you can also use the lockrecord statement or the lockorstop statement to lock the current record.


History

VersionStatusNotes
10.2NewNew in this version.