lockorstop

The lockorstop statement attempts to lock the current record. If the record is currently locked by another user, the procedure stops with an error


Parameters

No parameters.


Description

This statement attempts to lock the current record. If the record is not locked by any other users, the code continues normally. If the record is currently locked by another user, the procedure stops with an error.

let ReceivedQuantity=""
gettext "How many "+Item+" were received?",ReceivedQuantity
ReceivedQuantity=val(ReceivedQuantity)
LockOrStop
if error
    message "Could not update inventory, try again later."
    stop
endif
Qty=Qty+ReceivedQuantity
UnlockRecord

If you want the code to wait for the record to be unlocked, use the unlockrecord statement. If you want complete control over what happens in any case, use the lockcurrentrecord( function.


See Also


History

VersionStatusNotes
10.2No ChangeCarried over from Panorama 6.0.