Answer the question
In order to leave comments, you need to log in
Why are programmatically created directory entries not deleted?
Hello. There is some code:
&НаКлиенте
Процедура Старт(Команда)
НачатьГенерацию(Наименование, Количество);
КонецПроцедуры
&НаСервере
Процедура НачатьГенерацию(п_Наименование, п_Количество)
Если ЗначениеЗаполнено(п_Наименование) И ЗначениеЗаполнено(п_Количество) Тогда
л_Старт = 1;
Пока л_Старт <= п_Количество Цикл
л_Элемент = Справочники.Номенклатура.СоздатьЭлемент();
л_Элемент.Наименование = п_Наименование + л_Старт;
л_Элемент.Записать();
л_Старт = л_Старт + 1;
КонецЦикла;
Иначе
Сообщить("Нужно заполнить все поля");
КонецЕсли;
КонецПроцедуры
Answer the question
In order to leave comments, you need to log in
There is some code:Just creating items in the Nomenclature reference book - the details are not important.
Elements created in this way can be marked for deletion, but cannot be interactively deleted.Not enough rights. Practically in all typical ones, interactive deletion of elements in preset roles is prohibited.
the system "does not see" their mark for deletion when deleting markedIf the standard procedure from the "Operations" / "All functions" menu does not see them, then there really was no mark. If you have a separate processing, then they did not fall under some kind of filter - sort it out.
It would be more logical to attach, in addition, the code with which you are trying to delete the elements of the directory (if you do it programmatically, of course).
If you use the standard functionality for deleting marked ones, and you don’t see these elements there, try using the query console, for example, and select these elements of the directory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question