Simon_J2014-11-13 07:47:51
Simon_J, 2014-11-13 07:47:51

1s 8.2 how to unload the directory, taking into account a certain filter for the Nomenclature group?

The crux of the matter from the beginning and in order: It is
required to set up the upload of data from 1s Accounting Department for Ukraine (BP) to 1s Trade Management for Ukraine (UT). ideally it would be automatic.
But you only need to upload :
From BP > UT - only the reference book of the item with a filter by the Item group.
from UT > < BP - it is necessary to unload the Buyer Order (UT) documents in a bilateral order to the Buyer's Invoice (BP)
and back in the same sequence if the status in the BP changed to _paid_
Tried to do this using the built-in mechanisms in both UT and BP.
The result was
but there was no automatic start? - it's possible at all
there was no place how to make a directory filter so that only the necessary nomenclature would fall.
I spent half the night with the data conversion configuration and got even more confused, intuitively I understand that there should be a place where I can do something like:
Select * from Directories. Nomenclature where Code = "0100000"
Maybe my brain melted in the morning, or just time more is needed, but if anyone knows how to do this (or point me in the right direction) I would be very grateful.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Dmitry Kinash, 2014-11-13

1) Let's start with automatic exchange. Since you have wisely decided not to fence the bike, but to use the built-in mechanisms of standard platforms, then I draw your attention to the "Automatic exchange" tab in your exchange settings. Here you can set up an exchange according to a schedule or according to some event. Nothing over the top. I will only note that if the database is a file one, then you will need to specify in the settings the user under which the background task manager will start and which will have sufficient rights to work with exchange objects; and of course then start a session with the database on behalf of this user.
2) To work in Data Conversion 2.0 and 2.1 with external parameters, you need to create them on the Parameters tab in the element that describes the corresponding conversion (not the rules - these are subordinate directories, namely the conversion, where you describe from where and where, and where handlers are described global exchange events such as "BeforeUploadingData", "BeforeUnloadingObject", "AfterUploadingData" and others). If now you use the "Universal XML Data Interchange" processing, then in 7.7, in 8 your parameters will appear, to which you can specify the required values.
3) In case of automatic exchange in typical configurations, all exchange parameters are taken out in the settings of the corresponding exchange plans, where the nodes correspond to the exchange bases. So with different bukh databases, you can exchange either completely all documents, or only from counterparties from a specific folder (such as "white accounting").
4) If you do not have the ability to change the source configuration, then in the configuration itself you can implement receiving data into parameters. This is usually done in the "BeforeUploadingData" handler. Depending on the type of your parameter, you can assign a value to it using Directory.Nomenclature.FindByCode(123) or a collection of similar elements.
5) Filtering the uploaded data can be done in general in a hundred ways. You can go to the rules for uploading data (PD) and play around with a selectable set of initial data for uploading. You can go to the rules for converting objects (PKO) and there you can refuse to unload objectionable elements. You can make a filter from the configuration properties in the "Before Unloading an Object" handler mentioned above. And you can allow unloading in all three places, but cut off this data already at the stage of loading into the receiving base .... Look, for example, the typical rules for UT-BU exchanges, there is enough of such good there.

Salavat, 2014-11-13

I think you need to go to the infostart. They will help you faster.

Alexander, 2014-11-13

In "Data Conversion" load the rules, find the object conversion rule corresponding to the nomenclature and in the desired handler (most likely On Unloading, I don't remember exactly) write a condition like:

Если Значение.Код <> "0100000" Тогда
    Отказ = Истина;

thepry, 2014-11-13

Half the night I was fumbling with the data conversion configuration and got even more confused,

I just looked at the conversion a little bit, but it seems to me that you need to check in the rules for unloading the nomenclature object:
Before unloading:
If NOT Source.Parent = ..... Then
Refusal = True;
This will allow not to unload those in which the parent does not match the specified one. How to pass the nomenclature group as a parameter - I don’t know, try looking for info here:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question