When two users try to modify the same record in the same table, Navision inform you about error "Another user modified this record... bla bla". It's all right. But if there is some code on trigger OnValidate of the field, from which you modify the record, and this code makes some modifies in other tables, Navision doesn,t put transaction back and saves all modifyes in other tables. But changes in the modified record will be put back. :shock:
This error appears in Navision of all versions, workink with MS SQL Server.
Who met this problem and knows how to solve it, help please.
0
Comments
Here is a suggestion. It's not a good one, but onvalidate of the field add a modify(true); That way the record is saved. and if somebody else modified it will role back.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
This trouble is described in detail here (in russian):
http://forum.mazzy.ru/index.php?showtopic=5487
We have two tables. On some field of the first table there is code, which inserts records in the other table. There is no COMMIT in this code!
1. First user changes the field in a record of the first table, but don't validate it.
2. Second user, in the same time, from another Navision client changes the same record of the same table (any other field) and validates it.
3. Now the first user validates the field, which hasn't been validated (on trigger of this field we have code, which inserts records in the other table).
4. Navision informs us about error and doesn't make any changes in the first table. But changes in the second table (which was made from trigger OnValidate) will be saved.
I can send objects.
I've sent you a letter with objects by E-mail (alexey_pavlov@navigator.lv).
We tried to lock table 1, but there is no good effect ](*,) .