Question: I have created my own catalog and its forms in a 1C:Enterprise configuration. I have created events in the forms and filled them in as needed. When I test my catalog in the enterprise regime, while the catalog element form is open, attempt to save the element returns the error "Data was changed or deleted by another user". I am the only user connected to the database, what´s the point in getting this error then?
Answer: When a catalog item form or document form is opened by a user in the enterprise regime, upon saving the catalog element or document interactively (that is using the command on the form), the platform controls if the version of the opened form coincides with the version of the document or catalog element. In other words, the platform checks if the document or catalog element was changed in the database by another user interactively or via programming (not by a user interactively, but by code which ran at server) while it’s form has been opened in the given user’s session. If the version of the object (catalog element or document) differs from the version of the form, then the system gives this "Data was changed or deleted by another user" error. If there is only one person connected to the database and there are no running background processes, and you get this error anyway, then you should check the correctness of your code. For example, you could check and make sure no event of the form writes the object while its item form is open.