A
A
Alexey2015-11-06 10:18:36
Programming
Alexey, 2015-11-06 10:18:36

How to extract data from a document?

I want to extract all the data from the document being changed / added, for further data transfer to the site. Suppose a person adds an order to the "orders" document, after pressing the "record" button, the data should go to the site. I want to see the data preferably in an array of structures. But I don't know how to access the data.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Kinash, 2019-06-17
@alexeyshi

You can use the OnWrite procedures on the form and in the object module, but it is desirable to use a subscription to the OnWrite event - in this option, you can organize work with various documents in a single place (otherwise you need to change standard forms and then have difficulties with updates).
But if you do not need to send a request to the site every time the document is changed, but synchronization every hour (every 5 minutes) is enough, then I recommend using an exchange plan with auto-registration of your documents paired with a web service. The site calls the web service according to the schedule, it checks for new records in the exchange plan for the node of this site, if there is a non-empty selection and if the data is successfully sent to the site, the data by the selected package number is cleared.

But I don't know how to access the data.
Above was a general strategy, but judging by the comments, the author has a problem with understanding the basics. There are exactly two options for accessing data on the 1C:Enterprise platform - these are object (through a dot starting from an existing Object or Link) and tabular (selecting the necessary data using the query language).

P
pumbaEO, 2015-11-06
@pumbaEO

there is an event "AfterRecord" on the form, so it's more correct to use it.

P
Pan Propan, 2015-11-06
@mgis

хм. странный вопрос. к данным обращаются по имени. если это просто реквизиты то Документ.дата, или Документ.Номер,
если Табличная часть, то Документ.[НазваниеТабличнойЧасти], например Документ.Товары

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question