1c deleting marked objects programmatically. Accounting info. Example of deleting a directory item Nomenclature

Suitable for 1C 8.3 ZUP, 1C 8.3 Trade Management, 1C 8.3 Accounting and other 1C 8.3 configurations. Let's study the launch mode of the 1C 8.3 program Managed application.

Not everyone knows that this treatment actually replaced the treatment Universal selection and processing of objects. And the mark for deletion in 1C 8.3 is considered a service attribute of the object. Therefore, we can talk about changing the document details if you want to mark the document for deletion.

How to mark for deletion in the document journal

It makes sense to use the processing discussed above in 1C 8.3 for complex selections and a large volume of deleted documents. If you delete documents from one document journal, you can proceed as follows.

Step 1

In the open journal of Implementations documents, we set the selection for the counterparty “Carpenter+” and the Organization “Ivanov IP”:

Step 2

Click Ctrl+A– mark all selection documents, then while pressing the key Ctrl Click on the document that does not need to be deleted. For example, sales less than 10,000 rubles. Thus, we selected the necessary documents according to the example, which are highlighted in color (in this case yellow):

Step 3

Right-click on the list. In the drop-down context menu (or by clicking the More) select the desired command Mark for deletion/Unmark:

We get the result - 6 selected documents are marked for deletion:

How to mark for deletion using processing Universal selection and processing of objects

There is special processing for Information Technology Support (ITS) subscribers UniversalSelectionAndProcessingObjects.epf. You can find it on the ITS disk in the directory \1CITS\EXE\ExtReps\Unireps82\UniversalSelection\ or by searching in the online version of the ITS.

True, it only works when running 1C 8.3 in normal application mode. For a managed application, you can find similar treatments on developer sites.

We will use processing for ITS subscribers. To do this, we will configure the launch of the 1C 8.3 program in normal mode. Let's look at an example in the 1C 8.3 ZUP 3.0 program. We launch the 1C ZUP 3.0 program in Configurator mode. On the menu Service Parameters on the bookmark Launch of 1C Enterprise put a dot, as in the figure below, at the application Thick client (regular application):

Click apply. We launch the 1C ZUP 3.0 (8.3) program in mode Company(you can use the F5 button from the configurator). Now you can from the menu File – Open select processing from the directory where it is installed (or you can connect it).

Problem to be solved: Mark all documents for deletion Payroll and contributions for the Main Division for the period February-June 2016. for organizing Ideal in 1C 8.3 ZUP 3.0

Step 1

In the Search Object window, start typing the word “accrual”. The 1C ZUP 3.0 (8.3) program will offer options in the drop-down list. Selecting an object Calculation of salaries and contributions:

Step 2

On the Selection by details values ​​tab, use the “green button with a plus” to add selections, and set the condition: date > 02/01/2016, since the 1C 8.3 ZUP database contains the latest documents for June 2016:

Step 3

Click on the button Find Objects. We get the result. If we don’t want to mark an object for deletion, then uncheck the box next to it:

Step 4

Go to the bookmark Processing. Selecting processing Mark for deletion By clicking on the arrow, move it to the right side of the window - Selected treatments. Click Run. We get the result:

Step 5

Next, open the Payroll journal. We see that all payroll documents from February for the “Ideal” organization (except for the document for not the main one unit) are marked for deletion. Let's open a document that is not marked for deletion. We see that it is formed according to Division 2:

How to mark all documents for deletion at once without checking referential integrity

For example, this method can be used when a 1C 8.3 user decides to completely clear the 1C 8.3 database of documents, and use the existing directories and settings to keep records for another organization.

In the Main Menu (triangle in the upper left corner) select All functions. Finding processing

On the bookmark Deleting data With this processing, you can select not only all documents to be deleted at once, but also set individual types of documents and the deletion period. By default in 1C 8.3 there is a checkmark Delete objects, for which you have access rights:

We tick all documents. All you have to do is press the button Delete. But, please note that without referential integrity control, it makes sense to delete configuration objects when cleaning the 1C 8.3 database or when debugging the transfer (warning message from the developers). In other cases, it is better to mark objects for deletion.

/
Administration 1C:Enterprise 7.7

By mistake, a document or directory entry that is no longer needed can be deleted. Deleting records in the 1C program occurs in two stages:

First stage :

Marking objects for deletion that need to be deleted.


Manipulating an object's mark in a window Removing marked objects does not in any way affect the deletion mark in magazines and directories.

Postings operations marked for deletion turn off, postings document - are deleted. When the deletion mark is removed, the transactions are not automatically restored.

Recovery transaction postings select a team menu-> ACTIONS-> Enable postings, For document postings you need to open the document and re-run.

Deleting marked objects without exclusive mode.

If 1C is not running in exclusive mode, you will not be able to use standard uninstallation tools - 1C will display the error “”

How to delete marked objects without exclusive mode?

In a situation where it is not possible to run 1C in exclusive mode, but you need to delete marked objects, the “Deletion” processing, which can be downloaded from us, will help: deletion without exclusive access ( author Alexander Shatsky, modified by me: the speed of work has been significantly increased).

You can start processing in the “Enterprise” mode using the menu command file - open.

The interface is similar to standard processing. If you You don’t want to receive an “Object not found” error instead of the filled-in details - delete only with link control, without using the “Delete all” / “Delete links” checkbox.

Why were some objects unable to be deleted?

Such objects are displayed in the "Cannot be deleted" column. During verification (control), the message “*** from *** selected objects cannot be deleted” will be displayed.

Now why can’t some objects be deleted from the 1C database? It’s just that there are links to these objects in the 1C database. Somewhere in directories, documents, movements, this object is indicated and therefore the system cannot delete it. Such situations corrected manually and here you need a good knowledge of the 1C configuration.

All elements where the object being deleted is used are displayed in the "Links to the object being deleted" list. If it is possible to delete all references to the object being deleted, it will be possible to delete the object itself. If you forcefully delete an object, the system line " will appear in place of references to it "<

How to delete objects (directories, documents) marked for deletion from the database in 1C: Accounting 8.3 (revision 3.0)

2017-02-15T15:51:46+00:00

As you know, in 1C: Accounting 8.3 (revision 3.0) you cannot delete any object (directory, document) immediately. You can only mark it for deletion. This is explained by the fact that this object can be used in other database objects.

For example, a Nomenclature directory element marked for deletion can be used in existing implementation documents. Then this element cannot be deleted. And if the element is not used anywhere, removing it is easy!

Let us have the element “Brick” marked for deletion from the Nomenclature directory. Let's remove it from the database permanently.

1. To do this, go to the “Administration” section and select the “Delete marked objects” ():

2. Select “Automatic deletion of all marked objects” as the deletion mode. This option is almost always suitable. It may not be suitable only if, in addition to the “Brick”, we have other objects marked for deletion, which for some reason we do not want to delete now. And so - we always select the first option and press the "Delete" button.

3. The program will do everything itself and only at the end, if elements that are referenced by other elements of the database have been marked for deletion, a window like this will pop up. It shows elements that cannot be deleted (left side) and the objects that reference them (right side). Just click the "Close" button.

Sincerely, Vladimir Milkin(teacher and developer).

From this article you will learn how to permanently delete objects marked for deletion in 1C. The fact is that in 1C, deleting objects occurs in 2 stages:
1. Marking for deletion (a small red cross appears in the list of the object)
2. Removing marked objects.

Such a system is necessary because The deleted directory elements can be used in some documents. And if the program allowed you to immediately delete these elements, then they would be deleted from the documents and thus the accounting would be disrupted.

At the stage of deleting marked objects in 1C, a check is made for the use of the deleted objects in other objects. And if they are used, the program does not allow them to be deleted. But the program shows where the deleted objects are used and you, if desired, can open them and exclude the deleted elements from them, and then repeat the operation of deleting the marked objects.

How to delete objects in 1C 8.3

Let's look in detail at how to finally delete objects marked for deletion in 1C 8.3 using the configuration example, on managed forms - “Trade Management 11.2”.

To begin with - 1 - select the object needed to delete, select it and right-click on it in the window that opens

3 - We see that the objects we have selected are marked with a red cross (see picture below).

4 - In the menu “Master data and administration” - “Administration”. 5 – “Support and Maintenance” (see figure below).

6 - In the “Support and Maintenance” submenu that opens, select “Delete marked objects” and
7 — Put a checkmark next to the “Automatic removal of all marked objects” mode, and then click
8 — “Delete” button (see figure below).

10 - Here we see that deleting marked objects is completed, then click
11 - Click the “Close” button and we can continue further work in the program (see the figure below).

How to delete objects in 1C 8.2

And so, in this article “above” it was already discussed how complete deletion of marked objects occurs in 1C 8.3, i.e. in configurations on managed forms such as UT 11.2
Now, to fully answer the question “how to delete objects marked for deletion in 1C”, it will be necessary to go through the complete deletion procedure again, but using the example of 1C 8.2, i.e. configurations on “regular forms - “Trade Management 10.3”.

To do this we need to go through 11 steps:

1 - First, select the object you need to delete, select it and right-click on it in the window that opens
2 - Select “Set deletion mark” (see figure below).

3 — In the window that appears, click “Yes” (see figure below).

4 - Now we see that the object we selected is marked with a red cross (see picture below).

5 — In the “Operations” menu, select
6 - Deleting marked objects (see figure below).

7 — In the window that opens, click “Yes” (see figure below).

8 — In the “Search and delete marked objects” window, click the “Control” button (see the figure below).

9 — In the “Deleting objects” window that opens, click the “Delete” button (see the figure below).

10 - After all the actions performed, we see that “Objects were deleted”
11 — Click the “Close” button and we can continue working with the program (see the figure below).

You have deleted objects marked for deletion. If you need to delete all documents from the database, you can use

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 removal— a special procedure during which the system controls 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.

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:

Get 267 video lessons on 1C for free:

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

Selective can be useful to remove a specific object. For example, select “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 “Board 4000x200x20” for deletion, but it is included in the “Operation” and ““ documents. 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 is worth thinking about whether this item should not be marked for deletion.

In our example, I decided that I didn’t need these documents in the database either, so I checked them. As a result, the system deleted both the interfering item and the unnecessary document:

That's all, now you know how to delete documents and directories from 1C 8.3.

Automatic deletion of directories and documents