Desktop version

Main > Knowledge Base > Knowledge Base > Knowledge base > Practical developer guide 8.3 > Lesson 21 (0:40). Editing register records in document forms > Editing register records from 1C:Enterprise script > Writing register records from 1C:Enterprise script > Practical developer guide 8.3 > Lesson 21 (0:40). Editing register records in document forms > Editing register records from 1C:Enterprise script > Writing register records from 1C:Enterprise script

Writing register records from 1C:Enterprise script

If you run the Write() method of the document object, the document is written without involving the document form. This means that the BeforeWrite event of the document form is never called and so the handler script is never executed.

To synchronize the period of document register records with the document date in the scenario where the document is written using 1C:Enterprise script tools, you have to use the BeforeWrite event handler of the document object instead of the BeforeWrite handler of the document form.

During interactive document writing the BeforeWrite event of the document form is called first, and then the BeforeWrite event of the document object is called (see the chart of events in section Event sequence for writing documents from document forms).

Next page: In Designer mode




© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.