1C: Enterprise 8.2 (8.2.17.153)

Create a document "customer order":

НовыйДок = Документы.ЗаказКлиента.СоздатьДокумент(); 

I fill the fields "Дата" , "Контрагент" , ...

I add the goods. I fill in their fields Номенклатура , Количество , КоличествоУпаковок СтавкаНДС , Цена , Сумма , СтавкаНДС , Склад .

I write down the document:

 НовыйДок.Записать(РежимЗаписиДокумента.Проведение); 

1c gives an error:

{General Module. Additional Module. Module (247)}: Error while calling the context method (Write): The record is not correct! The period can not be empty! (Register of accumulation: the movement of goods; Line number: 1)

I tried to add this период both to the document itself and to the goods, but it gives an error: "The object field was not found."

What is this "Период" and where to screw it?

  • one
    It is necessary to look at the procedures of Creating on the Server, Opening and other handlers - when adding a row to the table part, changing the nomenclature. There are calls to procedures from general modules, which fill in a bunch of details required for the document to be correct. It is fortunate that the error was revealed during the process, it is possible that everything will be done and done incorrectly, then there will be a lot of headaches for correcting the failed documents. - Yura Ivanov
  • @Yura Ivanov thanks, I will consider. - lampa

2 answers 2

You need to see how the object is held in the object module. Maybe in the posting handler there is no period record in the corresponding register field.

  • @ teanYCH for sure! Repaired - lampa

It's simple. The document makes movements for some registers, so when moving through the register a period is not specified. Search in the document module - processing processing.