object-locks

Implements pessimistic and optimistic object locking for 1C:Enterprise concurrent editing.

1|2|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill object-locks-ingvarconsulting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: object-locks
Source: https://github.com/IngvarConsulting/unica-marketplace/tree/main/plugins/unica/skills/object-locks
Command: npx skills add https://github.com/IngvarConsulting/unica-marketplace --skill object-locks-ingvarconsulting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Concurrent editing of the same 1C:Enterprise object by multiple users causes conflicts like "Запись была изменена или удалена другим пользователем" and "объект заблокирован". This Skill guides you through choosing and correctly implementing pessimistic and optimistic object locks so every modifying path is protected and version conflicts surface as actionable messages. ## Core Features & Use Cases - Lock strategy selection: Distinguishes pessimistic locks (Заблокировать / ЗаблокироватьДанныеДляРедактирования) from optimistic version checks, and decides the form id lifetime question. - Full-path audit: Uses Unica MCP code search and graph tools to find every path that modifies an object, including background jobs and integrations, per standard 490. - Conflict handling design: Shapes loud interactive failures versus skip-and-log background behavior, and replaces raw platform version-conflict errors with application-level messages. - Use Case: A user reports "объект заблокирован" when a scheduled job runs. Use this Skill to trace all modifying paths, make the job catch the lock failure and skip with an event-log warning, and verify no transaction is rolled back merely because an object lock failed. ## Quick Start Ask the assistant to review why users get "Запись была изменена или удалена другим пользователем" when editing a catalog object and to add proper object locking to every modifying code path.

Frequently Asked Questions about object-locks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix "Запись была изменена или удалена другим пользователем" in 1C?

This error is an optimistic locking version conflict: the in-memory object is stale at write time. Handle it by catching the conflict and reporting it to the user in application terms, since the platform message names nothing useful and nothing is merged automatically.

What is the difference between Заблокировать and ЗаблокироватьДанныеДляРедактирования in 1C?

Both set a pessimistic object lock: Заблокировать is called on the object, while ЗаблокироватьДанныеДляРедактирования is a global method that can take a form id. Standard 490 requires taking the lock before modifying an existing object from code.

Does a pessimistic object lock in 1C prevent data modification?

No, the pessimistic lock is cooperative and only prevents another lock on the same data, not direct modification or deletion. The object is protected only because every modifying path locks first, so one path that writes without locking breaks the scheme.

Should a failed object lock roll back the transaction in 1C?

No, a failed object lock inside a transaction does not require rolling that transaction back. It may be caught and the transaction continued, which is the qualifier on the general rollback rule for managed transaction locks.

When should I use object locks versus managed transaction locks in 1C?

Use object locks for concurrency between users editing the same object; use managed transaction locks for transactions contending for shared data. The two mechanisms have different lifetimes and failure modes, and one is not a substitute for the other.