jacques marchal
Member
DOA 3.3.3 D4
Sometimes record lock is released before the Post or CheckBrowseMode of the row.
I use a table (Ralock) with two rows, first with key 'NE' used to prevent an other user to begin a process of delivery note (a delivery note must be compitely processed with his nr before another user attempts to begin an another delivery note).
The second row with key 'FA' acting the same manner to prevent two invoice to be initated at the same time. Invoice nr must be unique, without gap in the sequence and an invoice may be cancelled after the preview.
The flow of the machanism is like this:
Ralock.locate('NE',...)
Ralock.Edit //(lock is immediate)
Ask for transport cost in a separate window
Quickrep.Preview (or PreviewModal)
(after the close of quickRep)
Ask for Delivery note OK
if Yes,
Post in a table header the data of the delivery note
Marks the lines of DN as OK
Ralock.CheckBrowseMode (release the lock)
Exit
if Not,
Ralock.CheckBrowseMode
Exit
Same for invoice
At the 'ask for transport cost' the row NE of Ralock is locked.
An other user attempting to edit the row NE of Ralock receives the 'record is locked by another user' message.
When I am in DN preview from QuickReport, lock is released and an other user can begin a new NE, he can do Ralock.Edit (incidentaly with the
same nr and a violation of unique contrainst error when DN header is posted).
I guest QuickReport is the problem. Lock mechanism seems working in other cases, but sometimes lock is not released by CheckBrowseMode.
Anybody experimenting this ??
Jacques Marchal
Sometimes record lock is released before the Post or CheckBrowseMode of the row.
I use a table (Ralock) with two rows, first with key 'NE' used to prevent an other user to begin a process of delivery note (a delivery note must be compitely processed with his nr before another user attempts to begin an another delivery note).
The second row with key 'FA' acting the same manner to prevent two invoice to be initated at the same time. Invoice nr must be unique, without gap in the sequence and an invoice may be cancelled after the preview.
The flow of the machanism is like this:
Ralock.locate('NE',...)
Ralock.Edit //(lock is immediate)
Ask for transport cost in a separate window
Quickrep.Preview (or PreviewModal)
(after the close of quickRep)
Ask for Delivery note OK
if Yes,
Post in a table header the data of the delivery note
Marks the lines of DN as OK
Ralock.CheckBrowseMode (release the lock)
Exit
if Not,
Ralock.CheckBrowseMode
Exit
Same for invoice
At the 'ask for transport cost' the row NE of Ralock is locked.
An other user attempting to edit the row NE of Ralock receives the 'record is locked by another user' message.
When I am in DN preview from QuickReport, lock is released and an other user can begin a new NE, he can do Ralock.Edit (incidentaly with the
same nr and a violation of unique contrainst error when DN header is posted).
I guest QuickReport is the problem. Lock mechanism seems working in other cases, but sometimes lock is not released by CheckBrowseMode.
Anybody experimenting this ??
Jacques Marchal