hi there. I have a problem of collision between several users working on a same table at the same time. I have an Order table (to store all the content) with a Form working on it. 4 o 5 users from several delegations work with this Form. Sometimes, we´ve got this error: “Other user has changed the record #xxxx, close the form” o something like that. Do you know how to solve this problem?? I try to activate the property “UpdateOnActivate” but it didn´t solve my problem. what can i do to avoid such security/integrity holes? thanks for listening - David Edited by - dhildbrand on 2001 Mar 28 12:19:08
David this sometimes happens on Order Entry. User 1 creates the record by pressing F3 (INSERT & COMMIT) then takes a phone call. User 2 moves to the last record, thinks he has created the record then fills in the detail moving to the lines(MODIFY & COMMIT) changes. User 1 finishes the call fills the form and gets the error when moving off the form!. So it is a matter of good end user practices of creating records only by pressing F3 from the current record! Sometimes user 2 may have even posted the record then it allows the same invoice until you try to post it using the same “No. Series” that is! Invoice INV1234 already exists! David Cox MindSource (UK) Limited Navision Solutions Partner Email: email@example.com Web: www.mindsource.co.uk Edited by - David Cox on 2001 Mar 27 20:09:07
Look at the statement “SELECTLATESTVERSION”. This has prooved to be very helpful in such cases. ------- With best regards from Switzerland Marcus Fabian
Thanks Where can I call the “SELECTLATESTVERSION”?? from the “On activate” trigger of the Form or in the “OnGetRecord”? I don´t know how to use it. I hope you can help me! Thanks for listening David
Hi A solution might be to filter on the USERID when opening the form. But only if is is a large problem for de customer. Regards Esben
The SELECTLATESTVERSION statement is usefull whenever a situation might occur that a record is for a longer period of time (>2 Seconds) pending before being modified. You can use SELECTLATESTVERSION before you call a time consuming procedure (such as posting, printing of report) from within a record to make sure that the record is up-to date. You might also call SELECTLATESTVERSION after such a procedure has been called (typically if the function called might have modified the record). If you have the problem that other users might change your data and not a procedure, you might also call SELECTLATESTVERSION OnTimer of the form every second. You mus not call SELECTLATESTVERSION OnOpenForm or OnAfterGetRecord. Simply because it’s useless. In both cases the lates record has just been read. ------- With best regards from Switzerland Marcus Fabian
We solved this problem by filtering the order form by USERID, adding a new field to the Sales Header called USERID,and a SETRANGE in the OnOpenForm trigger. It will atleast prevent the users from taking each others orders.