//Locks the current foundset
databaseManager.acquireLock(foundset, -1)
//Locks the current row
databaseManager.acquireLock(foundset, 0)
//Locks all related orders for the current Customer
databaseManager.acquireLock(CustomerstoOrders, -1)
If you want to lock the current record at the moment a user clicks into a field, then use the “onRecordEditStart” property of a form. By letting that property trigger a method that contains: databaseManager.acquireLock(CustomerstoOrders, -1), you can “automatically” lock a record when a user clicks into it. You can
What is the expected behavior when a lock is in place? If one client clicks into a field and another client tries to click in the corresponding field at the same time should the second client be locked out of the field entirely, or should an error dialog appear (or something else)?
When a second client attempts to enter a field in a locked record the cursor is not able to change any data in the record, which is good. However, no dialog appears to notify the client that the record is locked. Thus the client will have no way of knowing that what they are experiencing is the result of a record lock.
I am using “databaseManager.acquireLock(foundset, 0)” to lock the record in a contacts file. I also notice that related files in tabpanels on the contacts form are not locked. Is that expected behavior? I thought that a lock would lock the current record and all the related records.
in the status bar you get “Record is locked” if i am not mistaken.
And record locking is just that record. If you want to do related you have to lock that also. Because where do we stop?
If you have relations going deep 5 or even 10 levels… should all those be locked then?
And we don’t know exactly which one you use on screen, that info know the developer so he should lock all the records he knows are on screen .