E
E
ElizabethP2020-08-02 12:47:34
1C
ElizabethP, 2020-08-02 12:47:34

How to programmatically write something to the comment to the document when reposting it?

I need to implement external processing, where there will be a group reposting of all posted documents, while the date of reposting must be entered in the comment to the document. How to implement it, tell me. Thank you all in advance

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sgr_A, 2020-08-02
@Sgr_A

//Получаешь нужным образом документы, которые хочешь провести
КоллекцияДокументов = ПолучитьДокументыДляПерепроведения();

//Обходишь коллекцию
//Получаешь объект от ссылки, меняешь комментарий и проводишь
Для каждого ДокументСсылка Из КоллекцияДокументов Цикл

ДокументОбъект = ДокументСсылка.ПолучитьОбъект();
ДокументОбъект.Комментарий = “ Тут пишешь дату”;
ДокументОбъект.Записать(РежимЗаписи.Проведение);

КонецЦикла;

I might be wrong in the syntax. I'm writing from my phone, I don't have a syntax assistant at hand.

A
Alexander, 2020-08-02
@Dem0lisher

1. This can be done by processing a group Change of Details (or documents and directories). There are different variations, some may even check the box DocumentObject.DataExchange.Loading = true;
This is necessary so that controls do not work in most types of documents (balances, mutual settlements, minimum prices, etc.)
2. Do not forget, if you pull documents for the past period, your relevance limit will shift. And I'll probably have to restore the sequence ..

K
Konstantin, 2020-08-02
@fosihas

If the configuration is on managed forms, you can read the Extension. This will allow you to make changes without withdrawing from support.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question