How to delete linked documents in 1s 8.3. Accounting info

Note: if the recommendations below are not clear to you, and information base There are a lot of marked objects that interfere with your work, so I recommend contacting us - Smart1C.ru.

If we consider the capabilities of typical application solutions- 1C: Trade Management 8, 1C: Accounting 8, 1C: Salaries and Personnel Management 8, then in none of them in 1C: Enterprise mode you will not find the ability to directly delete objects, you can only mark objects for deletion. In 1C, you can delete marked objects only by running special processing - by monitoring the possibility of deletion. It is the “Deleting Marked Objects” processing that checks whether there are references to the objects to be deleted. That is, whether the integrity of the logical structure of the 1C information base will be violated when objects are deleted.

Why is the removal process 2-step? I'll try to answer by simulating the situation. So, let’s imagine that the 1C operator entered data into the Nomenclature Directory in the program. Then, after 5 minutes, I discovered some kind of error, immediately deleted the element and created a new one. It seems like nothing wrong, but another operator had already created a Customer Order document, where he used a directory item, which was subsequently deleted. Accordingly, in the document there will no longer be a link to the nomenclature object; it will be written there that the object has been deleted. That is, the integrity of the database in this case will be violated. Even if you create a Directory element with the same data, it will have a different identifier, so restore it accordingly previous state Information security will no longer work. That is why the developers approached the process of deleting objects in the program so carefully.

Deleting marked objects in 1C 8.2

Let's look at an example of deleting marked objects in 1C 8.2 ( Regular application). But first, I’ll answer a site visitor’s question regarding what and in what mode marked objects are deleted. Deletion occurs in exclusive mode, i.e. only your session should be active in the infobase. Next, we perform the following steps:

Some statistics on deleting 1C objects - client-server architecture 1C information base with a size of 6.5 GB (PostgreSQL), 135,000 objects were marked for deletion, 92,000 of them can be deleted. The control was completed in 4 hours, deletion in 18 hours. Control and removal are not fast processes - I would advise you to first run them on a test base, then you will know the approximate estimated execution time.

Instructions

In order to delete an unnecessary document in the 1c Enterprise 8.2 program, you need to mark it for deletion. There are several ways to do this:

Hover over the document and click on it right click mice. In the submenu, select “Set deletion mark”;

Hover the cursor over the document, click on the “delete” icon (sheet with a red cross) on the toolbar.

A dialog box will appear: “Mark item for deletion?” - yes.
After this, the document will have the status “Not Posted” and a red cross will be placed on it.

To restore a document marked for deletion:
- hover the cursor over the document, right-click on it, and select “Uncheck deletion” in the submenu;

Place the cursor over the document, press the Delete key on the keyboard;

A dialog box will appear: “Unmark the item for deletion?” - yes.

To destroy documents marked for deletion, you need to go to the “Operations” menu item. In the submenu, select “Delete marked objects.”
A dialog box will appear: “Preparing to delete marked objects may take a long time! Continue the operation?" - yes.

An inventory of all items that are marked for deletion will open. You must click on the “Control” button, then on the “Delete” button. After this, all elements are deleted and cannot be restored.

Please note

When objects marked for deletion are destroyed, only one user can be in the infobase. Other users of the infobase need to exit the program.

A user who wants to destroy documents marked for deletion must have rights to perform this operation. User rights are set by the database administrator.

Deletion is a very responsible operation, which often leads to irretrievable loss of information. In addition, there is a danger of mistakenly deleting the necessary data. For this reason, the developers of the 1C program took the implementation of this function quite seriously.

You will need

  • - “1C: Enterprise” program.

Instructions

Launch the 1C: Enterprise program and open the desired database. Configure the document deletion mode in 1C. To do this, go to the “Tools” menu, select “Options”, go to the “General” tab. In the bottom line you can set the option for the object deletion mode. It can take two values ​​– “Direct deletion” or “Mark for deletion”. Select the second option and click OK.

Open the directory from which you want to delete 1C documents. Place the cursor on the line with the document, click the Delete key on the keyboard, or click the “Delete” button on the toolbar. You can also mark a document for deletion using the corresponding command in the “Actions” menu. After these steps, the documents will not be deleted, but their status icon will be crossed out with a cross. You can cancel this mark at any time using the same methods.

Today we will talk about deleting documents, as well as any 1C Accounting object data in general (I explain what object data is and how it differs from others in my full 1C Accounting 8 course with examples). Sometimes there are situations ( yes, perhaps not sometimes), when you need to delete a document, but it doesn't want to leave. Let's see why this happens and how to fix it.

Since we are talking about removal, and this operation irrevocable, then be sure to read the article about database backup. Very often this helps to avoid major problems in the company!

How to delete a document in 1C Accounting

First, let's look at how objects are generally deleted in 1C Accounting 8. First of all, it should be said that not a single object (1C document, directory element, etc.) can be deleted directly, as, for example, we delete unnecessary files on Windows. The process of deleting documents in 1C is a little different.

COMMENT! In some versions of 8.3 it is possible to directly delete elements, including pre-installed ones(!). Never use this, much less cancel it this operation impossible!

To delete a directory element, group or document that you no longer need, you must first mark for deletion. This can be done using the key Delete on the keyboard or the corresponding button on the toolbar. Below is an example from 1C Accounting 8.3:


Before clicking the delete button, make sure that the desired object is selected in the list. During the operation, the program will ask for confirmation of the action.

website_

After confirmation, the object will be marked in the list with a red cross on the left, as in the figure below. By the way, about the cross, but another one, there is another one here on the site.

website_

Please note: When you mark a directory group for deletion, all elements, as well as subgroups, will also be marked for deletion. As a result of this, If there are many elements in the group marked for deletion, the process may take some time!

You can remove a mark for deletion in the same way as you can mark it.

If you mark it to , its execution is cancelled.

To finally get rid of 1C Accounting database objects marked for deletion, you need to start processing "Deleting marked objects". For 1C Accounting 8.3, to do this, go to the main menu.

website_

And for 1C Accounting 8.2, to delete marked objects you need to go to the menu "Operations / Deleting marked objects." or in the "Administration" section.

website_

Remember: deleted objects cannot be restored. No way.

There was an important part of the article, but without JavaScript it is not visible!

Why is the document not deleted?

However, quite often there are situations when an object marked for deletion cannot be permanently deleted. For some reason the program cannot do this. Why?

In 1C Accounting, a document or directory element cannot be deleted if there is at least one link to it.

Thus, if a document “does not want” to be deleted, it means that it is referenced by other documents in the 1C database. What do you mean by reference? Very simple. This means that in another document There is a field in which this "non-deletable document" is selected as a value. An example for 1C Accounting 8.2 is given below.

website_

If you try to delete the invoice underlined in this document, then a situation with an “eternal” document will arise. There is a separate article about such cases when a document or directory element is not deleted. I recommend checking it out.

Let's sum it up

If you do not delete any document, directory element, or something else that is deleted by setting a deletion mark, then you need to sequentially delete all links to the object being deleted. Only in this case there will be no obstacles to its final removal.

Of course, if the objects with which it is associated this document, you need, then you can forget about deleting. For example, there was a warehouse. Then he was liquidated. However, it will no longer be possible to remove it from the 1C Accounting database, since it is used in many documents. However, after collapsing the database, you can still get rid of unnecessary documents.

I discuss the features of working with objects marked for deletion, deleting links to objects and other related issues in my full course on 1C Accounting. After passing training course all your questions about 1C will disappear.

How to delete documents and directories in 1C 8.3? In the program, you can delete marked objects in two ways:

  • Interactive deletion;
  • Through a mark for deleting objects.

Let's look in detail at examples of how to delete documents marked for deletion in 1C 8.3.

Interactive deletion in 1C

Interactively delete in 1C– this is to delete immediately, without checking referential integrity.

Attention!!! IN in this example shown - how it is forbidden do!

In standard configurations, 1C developers have disabled this feature for most documents and reference books:

And what could this lead to if there was such an opportunity? For example, in the demo database configurator we will enable the ability to edit objects, and for the role Full rights for reference books Nomenclature And Counterparties check the box Interactive removal:

Now let's go into user mode and delete a couple of directory elements by first selecting and clicking Shift + Del:

  • Directory Contractors:

  • Directory Nomenclature:

And now in the 1C 8.3 configurator we will launch Testing and fixing and check the referential integrity of the information base. As a result, we get a large number of errors in various objects:

In the user mode of 1C 8.3, for example, in the document Sales of goods we will see broken links, that is, links to objects that no longer exist:

And we just deleted two elements of the directory. What can it lead to? further work with interactive deletion? Therefore, it is recommended to uncheck the interactive deletion box in 1C 8.3.

Through a mark for deleting objects

With this method of deletion, referential integrity is checked and if the object has links, the object will not be deleted.

Let's consider the following example: in the user mode of 1C 8.3, let's mark the deletion of objects:

  • In the directory Contractors:

  • In the directory Nomenclature:

To directly delete objects marked for deletion in 1C 8.3, you need to start processing . This processing you can run:

  • Main menu – All functions – Processing – Deleting marked objects:

  • Main menu – All functions – Standard – Deleting marked objects:

  • Section Administration – Service – Deleting marked objects:

  • Section Administration – Program settings – Support and maintenance – Deleting marked objects:

  • Section Operations – Service – Deleting marked objects:

Processing “Deleting marked objects”

Processing “Deleting marked objects” allows you to delete in the 1C program without the need for exclusive mode, that is, you can delete objects when users are in the 1C 8.3 infobase:

Also in 1C 8.3 on the form it is possible to set a checkbox “Block all work in the 1C program and speed up deletion”. In this case, exclusive mode will be required for the duration of deletion.

To see users who are in at the moment work in the information base, and you can ask to exit the program while the deletion is running:

  • By clicking on the hyperlink "users(n)" on the form "Deleting marked objects", where n is the number of active users;
  • Section Administration – Program Settings – Support and Maintenance – Active Users;
  • Section Administration – Service – Active users:

Processing allows you to choose one of two deletion modes: automatic or selective deletion of objects in 1C 8.3.

As a result, objects that have no references are automatically deleted:

Here we can indicate which objects we want to delete, leaving the checkboxes enabled. Click on the button Delete. Objects in 1C that do not have links to other objects will be deleted:

Upon completion of the deletion operation, the 1C 8.3 system will show the objects that could not be deleted and their links - in which objects these elements are used:

Here you need to look:

  • Either we mistakenly marked these objects for deletion and we need to uncheck this mark:

  • Either this is a duplicate, then you need to use processing "Search and remove duplicates". This topic is discussed in detail in the article:

After completing this operation in 1C 8.3, our item marked for deletion will no longer have a link to the document Implementation (act, invoice):

  • Or remove references to this object. That is, on the right side of the form “Places of use of the object...” mark the deletion of this object (if it is not needed and was entered incorrectly), or you need to go into these objects and redefine the link:

After completing our manipulations, click on the button To the beginning:

Let's go back to the window:

Leave all the checkboxes enabled and click on the button Delete:

Since objects marked for deletion no longer have links, they will be deleted in 1C 8.3.

Attention! Before deleting objects marked for deletion – .

If there was duplication of an employee’s personal data in 1C 8.3 ZUP (several individuals for one person), then it is possible to combine duplicate cards with the help of a special assistant. How to do this, watch the following video:

Automatic removal in 1C 8.3 through routine operations

In the 1C program it is possible to use regulatory task produce automatic removal by setting a schedule.

This function can be configured in the section Administration – Program settings – Support and maintenance – Routine operations, where we check the box “Automatically delete marked objects on a schedule”:

It is advisable to set the schedule for the time when the system is least loaded and no one is working in the 1C 8.3 information base.

Using the example, we will set up a schedule from 05/03/2016, daily from 02:00 a.m. Follow the hyperlink Set up a schedule. Schedule settings – tab General:

Deleting directories and documents in the 1C 8.3 Accounting program is not possible.

The 1C 8.3 program does not allow you to delete directories and documents in the database immediately, without additional checks. This is done in order to avoid possible errors. For example, if you want to delete an item that is included in a document, you cannot do this.

Let's look at how to delete documents and directories marked for deletion in 1C 8.3. Removal in 1C 8.2 is slightly different, but has a similar algorithm.

Deleting objects in 1C occurs in two stages:

  1. Mark for deletion - setting a sign that a document or directory is planned to be deleted. This element is no different from others; it can also be selected in other objects.
  2. Direct deletion is a special procedure during which the system checks whether there are links to a given object in the database. After reference control, 1C makes a decision: whether the object marked for deletion can be deleted or not.

Let's look at these two steps. The instructions are absolutely universal and are suitable for all configurations on 1C 8.3 - Accounting, ZUP, Trade Management, ERP, Small Firm Management and so on.

Mark for deletion

Setting a mark for deletion in 1C is very simple. Simply select the document or reference book you are interested in from the list and press the “delete” button:

After which you need to confirm your intention. You can now see a special note in the log:

This means that the next time you delete objects through special processing, the system will offer to delete this item of the nomenclature.

How to delete objects marked for deletion in 1C 8.3

The second stage is directly deleting what is already marked in the 1C database. This is done using a special service processing “Deleting marked objects”. It is located on the “Administration” tab:

When opened, 1C will give us two options to choose from - automatic deletion of all objects and selective:

Selective can be useful to delete a specific object. For example, choose “ Automatic mode" and click "Delete". The deletion of all objects marked for deletion in the system will begin. At the end of the work, the system will display conflict situations - objects that are marked for deletion, but are included in accounting:

Here you need to make a choice. For example, we marked the item “Board 4000x200x20” for deletion, but it is included in the documents “Operation” and “Production report for the shift.” If we don’t need these documents either, we simply mark them for deletion and click on the “Repeat deletion” button. If documents are needed, it’s worth thinking about whether this item should not be marked for deletion.

In this example, it was decided that these documents are also not needed in the database, so we will mark them. As a result, the system deleted both the interfering nomenclature and the unnecessary document:

Automatic deletion of directories and documents

In the 1C 8.3 platform, an excellent opportunity has appeared to delete marked objects automatically. This opportunity implemented using the so-called regulatory task. The system will perform this procedure according to a schedule. It will take 3 minutes of your time.

To configure, go to the “Administration” - “Support and Maintenance” tab, there is a checkbox “Automatically delete marked objects on a schedule”:

When you click on it, the system will offer the desired option for the schedule:

Based on materials from: programmist1s.ru

Share