Marking for deletion of a predefined directory element is prohibited. Predefined directory elements. Incorrect specification of a predefined element

Simple processing for working with predefined values.

Allows you to compare information security elements with elements predefined in the configuration.

Allows you to check the entire configuration for the presence of duplicated (several information security elements associated with one predefined element - error) and missing elements (predefined elements that are not associated with information security elements - error). Such elements could arise during exchanges or failures and lead to errors in the configuration.

You can simply view the current values ​​and make any necessary changes.

Operating procedure:

1. We start processing.

2. Select the type (directory, chart of accounts, PVC, PVR).

3. We select the directory of the selected type.

4. All predefined elements available in the information security and described in the configuration appear in the tabular part of the processing.

If there are several elements in the database that are tied to one predefined property, or some of the elements described in the configuration are not assigned information security elements, the system will report this when selecting a directory. Duplicate and missing items will appear at the top of the list and will be highlighted in orange.

5. We set new values ​​for the required predefined elements.

In this case, lines for which a predefined element disappears from the configuration are marked in red. The blue ones are the lines for which the predefined element changes, the green ones are the lines for which the predefined element appears.
If there are a large number of duplicates, it is convenient to select all the extra lines with the mouse and indicate for all selected ones the cancellation of the connection with the “Cancel match” button (from version 1.3.1)

6. We perform reassignment by clicking the “Reassign elements” button.

Checking duplicates(error "The predefined element is not unique"):

When you click the "Check duplicates" button, the processing will check all reference books, charts of accounts, PVC and PVR and display a list of tables with duplicated elements indicating the number of duplicated elements.

After this, you need to check separately the objects for which errors were found.

Checking missed entries(error "The predefined element is not in the data"):

When you click the "Check Missed" button, processing will check all reference books, charts of accounts, PVC and PVR and display a list of predefined elements that are not associated with information security data.

Requires platform 8.3.3 or higher to use.

Universal, can be used with any configuration.

Detect language Afrikaans Albanian Arabic Armenian Azerbaijani Basque Bengali Belarusian Bulgarian Catalan Chinese (Simp) Chinese (Trad) Croatian Czech Danish Dutch English Esperanto Estonian Filipino Finnish French Galician Georgian German Greek Gujarati Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Kannada Korean Lao Latin Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Tamil Telugu Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Afrikaans Albanian Arabic Armenian Azerbaijani Basque Bengali Belarusian Bulgarian Catalan Chinese (Simp) Chinese (Trad) Croatian Czech Danish Dutch English Esperanto Estonian Filipino Finnish French Galician Georgian German Greek Gujarati Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Kannada Korean Lao Latin Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Tamil Telugu Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish

Good day.

Today we’ll talk about the innovation in platform 8.3 regarding predefined elements.

Introduction

Let me remind you that earlier in practice, very often I wanted to look at a directory element to find out its predefined name. For example, you created two predefined counterparties and named them IPSidorov and OOOMeteor. And they sewed some logic onto them.

When everything was debugged and worked out, it turned out that the task was posed in reverse and the logic for the individual entrepreneur was needed for the LLC, and the logic of the LLC was needed for the individual entrepreneur. “No problem,” we say, and in enterprise mode we rename the elements. After all, getting into the code is much more difficult. A year passes and you are given a new task: to set up some more logic for IP Sidorov. You go into the configurator, write logic, start checking and nothing works, because... in the IPSidorov configurator, and in the enterprise - OOOMeteor. The brain is broken and I want to destroy this rake. The simplest and most obvious thing is to display the name of a predefined element in the form of a list. Here’s the catch: you can only get the name of a predefined one in 8.2 using the method. But the method has its own inconveniences; it cannot be obtained in a request. Those. The first inconvenience is to get the name of the predefined one from a reference to the directory.

The second inconvenience is when we already have a directory element and we need to make it predefined. We create a predefined element and get two elements in the directory. One is predefined, the other is operational, which is referenced in all our documents. Replacing links certainly helps, but if the database is large, then it is difficult.

Now to the point

The first is that the directory now has the "Updating predefined data" property.

What does this field give us? If it is set to "Do not update automatically", then by adding a predefined element, we will not see it in the directory right away. Those. metadata is not associated with the data in any way. And if you do not create it in the directory, then accessing it by its name through the directory manager will cause a syntax error.

Very interesting, but why? How can we create an element in the directory? You can create it however you want, or you can link it to an existing one. Now the directory has the attribute "Name of Predefined Data". We create a directory element programmatically as usual through “Directories.Contractors.CreateElement()” and fill its attribute “PredefinedDataName” equal to the name of the predefined element. Or if the element already exists, we get its object and again fill in the “Name of Predefined Data”. All.

And finally a little syrup

This new attribute is not only available for reading and writing, but it is also available in requests. This way you can impose conditions on it in queries, determine whether it is predefined or not.

Thank you for your attention.

Predefined directory elements are created in the configurator mode. In the "1C:Configurator" mode, the names of predefined elements are determined. The elements themselves, which are stored in the database, are created in 1C:Enterprise mode. Thus, a predefined element is metadata (the name of the predefined element) and data (the directory element itself).

1C:Enterprise 8.2

In 1C:Enterprise 8.2, predefined elements added or deleted in the configurator are automatically added or deleted in the database.

1C:Enterprise 8.3

In this version of the platform, each directory contains a standard attribute "Name of Predefined Data". It is designed to store a predefined name and can be changed programmatically. When adding a new element in the configurator, this element can be created in the database or not - this depends on the directory property "Updating predefined data". If the value is set to "Update automatically", then the predefined elements created in the configurator will be automatically added to the database. If the property is set to "Do not update automatically", items will not be added to the database. In this case, you need to create them yourself and programmatically link them to predefined elements of the directory by setting the “Name of Predefined Data” attribute.

Updating 1C is a necessary procedure that allows you to improve the form for submitting reports and documentation. Innovations are constantly appearing in the current legislation, and calculation methods are regularly changing in the economic field. Therefore, you need to update the 1C configuration to fully comply with all the changes.

The 1C company tries to make it as easy as possible for accountants and entrepreneurs to work with its software. At the first appropriate opportunity, it releases high-quality updates to software products. They must be installed correctly and accurately.

Many people believe that updating 1C is a job for a specialist. They say that it is not possible to implement this procedure with your own hands. This is a misconception. The difficulty of updating lies in which database you are using - standard or modified. And also, on what configuration is installed on the computer.

If the base is standard (that is, the programmer did not add anything to it or change anything), then the update will take from 15 minutes to 3 hours maximum. The procedure is performed in user mode. If the base is changed, then it will take much more time.

If the update is incorrect and of poor quality, it may data will be lost and all previously completed modifications will be lost. So

Error 1: "The name of the predefined element is not unique"

This means that the essence of the error lies in the program platform itself. It was incorrectly updated by you on the latest version of 1C. To fix this, you need to downgrade the program version to the previous one. If your computer does not have the previous release, you can download it from the official website. After installing the previous version, you can start updating the data configuration again.

Error 2: "The file does not contain any available updates"

This means that the configurations did not match. There are standard and non-standard configurations. Perhaps the downloaded files belong to one configuration, but another is installed on the computer. Solution to the problem: an empty standard configuration database is created and saved to a .cf file, then the file is used to update the no longer standard configuration. To obtain the standard version, the configuration must be supported (that is, the yellow cube must be displayed).

Error 3: "The predefined element is not in the data."

Error 4. “Stream format error.”

What happens most often is that people don't stick to rolling upgrades, but instead take their configuration and compare it to the delivery file. They do this in order to reduce time. The essence of the process: the delivery file and configuration are opened, and a careful comparison of them begins; all noticed changes are written to a text editor. Then they are added to the configuration. It's better not to do that. Let it take you longer to update consistently. But you won’t sit and puzzle over why the 1C program crashes and a stream format error appears.

Error 5. "The name of the predefined element is not unique."

This means that the configuration was not updated on the previous platform, and on the current updated platform it does not consider the name of the predefined element to be unique. You need to return to the previous 1C platform and update the configuration there. Then install the new platform. The error will disappear.

Error 6. “Error writing world country” and “Error calling context method.”

This occurs when the existing configuration is severely corrupted. On your screen you can see the following picture: the program will update the configuration up to a certain point, then it will simply crash or, for no apparent reason, will start the update process all over again. What you need to do: get the update file from the developers; we read information that such and such an update will be installed and will replace the existing version; click “ok” and receive a notification about what exactly was changed in the configuration (it may also be that nothing has changed); Click on “accept changes”; a window will appear asking you to update the entire database according to the new configuration; We give our consent to this procedure. It is very important to stay consistent. Let the program slowly do all the actions in order.

Error 7. “Error while recording profile. Such a profile already exists.”

You need to go to the directory of user profiles and analyze it. There are probably duplicates there. For example, several profiles of accountants or administrators. If found, delete unnecessary profiles and leave one. After this, the error will disappear from the computer screen.

To eliminate all of the above errors, you need experience with the 1c program, as well as professional skills. If you are not well versed in errors and have not fully understood their description (how to resolve them), you should contact a specialist.

Some types of errors do not require a specialist to be on site. They are so simple that their solution can be explained over the phone. To eliminate more complex errors, the direct participation of a specialist is required.

If you urgently need to prepare reports, make calculations and generate documentation, but you have not found ways to eliminate the error, please contact us.

The very idea of ​​programmatic work with predefined elements, in my opinion, is very correct. There are simply nuances that need to be taken into account when working.

First, you need to clearly understand for yourself that there are predefined elements in the configuration and there are predefined elements in the information base (IS). Technically, predefined information security elements are the most common elements of directories, in which the “Name of Predefined Data” attribute indicates which predefined configuration element they correspond to. They are no different from ordinary elements. Accordingly, any ordinary information security element can be made predefined, any predefined element can be made ordinary. To do this, just enter the desired value in the attribute "PredefinedDataName".

From time to time, this property contains a value that is not the one the developer intended. As a result, errors occur in the operation of 1C. From critical, in which work is basically impossible, to non-critical, in which the logic of the algorithms is disrupted.

Conditionally we can distinguish three types of errors:
1. "The predefined element is not in the data";

3. Incorrect specification of a predefined element;

1. "The predefined element is not in the data" - o absence of a predefined element described in the configuration in the information security data.

This is the easiest type of error to debug and correct. Its simplicity is that the platform quite correctly reports this situation “The predefined element is missing in the data” and it is quite clear how to fix it.

When accessing a missing element in the code "Directories.Types of Contact Information.Email of the Contact Person" a message is displayed

When accessing an element in the request "VALUE(Directory.Types of Contact Information.Email of the Contact Person)" the following message is displayed:

This error occurs if an element is described in the configuration, but the element is not associated with it in the database.

To begin with, let us clarify that this situation is not always wrong. It is quite possible to use predefined data in some kind of program logic, which for most users may not be used. In this case, in order not to clutter up the directory for all users of the configuration, it is logical to define predefined elements in the configuration, but not to create them in all information security systems, but only for those information security systems in which the required configuration logic is used. In this case, the programmer can specify the “Do not update predefined data” property for the directory and create elements programmatically when accessing the module functionality. Or allow the user to independently bind predefined module elements to existing regular elements.

Also, automatic creation of predefined elements is not used when working in RIB mode. Since new elements must be transferred from the central database, and not created in nodes with different UIDs.

Those. Sometimes the error is the reference to an unmatched element, not the presence of such an element itself.

It is necessary to analyze why the element was not created. Perhaps it should be created when some program mode is executed. For example, after completing an exchange in RIB. Or perhaps it was just accidentally deleted.

If the logic provides for filling predefined elements not automatically, but in a separate mode, then before using access by name " Directories.Types of Contact Information.Email of the Contact Person"To prevent an exceptional situation, it is advisable to check that the element is already in the database. If the element is missing, then inform the user about this and explain what mode he needs to perform to fill the element. For such a check, you can run a data query.

Request = New Request; Request.Text = "SELECT | Types of Contact Information. Link | FROM | Directory. Types of Contact Information HOW Types of Contact Information | WHERE | Types of Contact Information. Name of Predefined Data = "" EmailContactPerson

"""; Item Is MissingInData = Query.Execute().Empty();If this is still an error in the database data, then it is necessary to bind to a predefined element of the information security element. Those. it is necessary to explain to the system which information security element the program code should access by this name. Technically, a binding is simply specifying the name of a predefined element in the " propertyPredefinedDataName

2. " of the IS element. To install it, just run the code:"The predefined element is not unique" - h

double predefined elements:

This situation is that several information security elements are attached to one predefined element. In this case, when accessing a predefined name, the element will be selected randomly. This situation is always wrong. Its difficulty is that the platform does not report it in any way. The algorithms just start working incorrectly.

The platform will report the error “The predefined element is not unique” only when you try to edit a duplicate element.

Such duplicates can be created, for example, if RIB is used for the directory and the “Update automatically” mode is specified in the properties for predefined data. In this case, when performing an exchange, one instance of the predefined data will be created when the configuration is updated. A second instance of predefined elements with the same name will be transferred from the central database during the exchange.

Also, these duplicates will arise when using exchange processing between configurations if different information security elements correspond to predefined elements in different databases. In this case, one copy of the predefined data already exists in the database, the second will come when loading data with a different UID. If you are performing data transfers, you need to decide which database elements are considered primary and use them in the subordinate database. In the subordinate database, it is necessary to replace the use of old elements with elements of the main database.

Such errors in the database can be identified with a query like:

SELECT Types of Contact Information.Name of Predefined Data, QUANTITY(DIFFERENT Types of Contact Information.Reference) AS Number of Predefined FROM Directory.Types of Contact Information AS Types of Contact Information GROUP BY Types of Contact Information.Name of Predefined Data HAVING QUANTITY(DIFFERENT Types of tactInformation.Link) > 1

This query will return a list of predefined elements with which more than one information security element is associated.

If such elements are present, it is necessary to remove the connection with the predefined one for one of them. Those. It is necessary to unambiguously determine for the system which information security element the program code should refer to when using this name. To do this, just run the code.

3. Incorrect specification of a predefined element.

The error is that the predefined element corresponds to an element that is not provided by the program logic. Such errors are the most difficult to diagnose. Unlike the first two types, the configuration cannot be automatically checked for these errors. They can only be identified by analyzing the logic of work. If in doubt, you can check whether the correct element is being used.

To do this, just run one of the commands.

//Defining an information security element that is linked to the desired predefined Notify (Directories.Types of Contact Information.Email of the ContactPerson) //Defining a predefined element to which the selected Notify is attached (Link to Element.Name of Predefined Data)

If such errors are identified, it is necessary to remove the incorrect connection with the old element and add a connection with the new element. The operation code is similar to the code for correcting the first two types of errors.

Well, briefly about errors during program work or in configurator mode:

"The predefined element does not belong to<Имя справочника>" - an error occurs when trying to write a predefined element with a name that does not match the name in the configurator.

"Non-predefined objects cannot have predefined subconto view records" - an error occurs when trying to make an element of a predefined chart of accounts unpredefined. To eliminate errors, it is necessary to remove the “Predefined” flag from each element subcontact line.

"Non-predefined objects cannot have predefined records of leading calculation types"- an error occurs when you try to make a predefined element of the plan of calculation types unpredefined. To eliminate errors, it is necessary to remove the “Predefined” checkbox for each line of the element’s leading calculation type.

"Predefined elements are not unique"- an error is generated in the configurator when updating the information base for a configuration release without compatibility mode with 8.3.4. It is necessary to check for duplicates and eliminate them before updating.

"The name of the predefined element is not unique" - the error occurs when there are several predefined elements of the same name in the configuration when updating to the platform8.3.6.2332 and higher. It is necessary to eliminate duplicates in the configuration.

To work with predefined data, I recommend processing. It can perform any actions with predefined data, and can also check the configuration as a whole for the presence of errors of the first two types (duplicated and missing elements) in all information security objects (directories, charts of accounts, PVC, PVR).