Internet Windows Android

External processing 1c 8. Adding external processing to the base

Consider in this article step-by-step instructions for creating external processing in 1C 8.3 in the managed application mode, respectively, we will use managed forms. And most importantly, we will learn how to connect it to the mechanism of "external processing" of 1C configurations built on the library standard subsystems version 2.0 and newer.

The task will be as follows: create the simplest external processing, which will perform a group action on the "Nomenclature" reference book, namely, to set the selected percentage of the VAT rate for the specified item group.

To do this, we will immediately make the necessary settings in the program (the configuration of 1C 8.3 is considered: "Enterprise Accounting 3.0" on managed forms).

Checking this box enables us to use external processing.

Creating a new external processing in 1C 8.3 by example

Now let's go to the configurator. In the "File" menu, select "New ...". A view selection window will open generated file... We select "External processing":

A new external processing window will open. Let's give it a name right away. It will be offered when saving processing to disk:

Let's add a new managed processing form. We indicate that this is a processing form and it is the main one:

We will have two details on the form:

  • Nomenclature Group - link to the "Nomenclature" reference book;
  • VatStavkaVAT - a link to transfer the VAT rate.

Create requisites in the "Attributes" column in the upper right window. We drag them with the mouse to the upper left window. The new details should immediately appear on the form below.

The order of the details can be changed by arrows "Up" - "Down":

Get 267 1C video tutorials for free:

It remains to add the "Install" button. In managed forms, you can't just add a button to a form. Even if you add it to the structure of form elements, it will not be visible on the form itself. The button must be associated with the command that it will execute. Go to the "Commands" tab and add the "SetVATBet" command. Create an action in the command properties. Select the command handler "On the client". The command can also be added to the form by simply "dragging and dropping" into the section with form elements.

A procedure of the same name will be created in the form module. In it, we will call the procedure on the server:

& OnClient

Procedure SetBetVAT (Command)

SetBidVATOnServer ();

End of Procedure

In the procedure on the server, we will write a small request and actions related to setting the VAT rate:

&On server

Procedure SetBidVATOnServer ()

Request = New Request;
Request.Text =
"SELECT
| Nomenclature.Ref.
| FROM
| Reference.Nomenclature AS Nomenclature
| WHERE
| Nomenclature.Ref IN HIERARCHY (& Nomenclature Group)
| AND NOT Nomenclature.
| AND NOT Nomenclature. ThisGroup ";

Request.SetParameter ("Nomenclature Group", Nomenclature Group);
QueryRes = Query.Run ();
SelectDettRecords = QueryRes. Select ();

While EndingRecord.Next () Cycle

Attempt
SprNomObject.Write ();
An exception
Report ("Error writing object" "+ SprNomObject +" ""!
| " + DescriptionErrors ());
End of Attempts;

End of Cycle;

End of Procedure

We return to the "Form" tab, add a button to the form and associate it with the command:

As such, our processing is ready to use. To call it, in the 1C Enterprise mode you need to go to the File - Open menu and select the created file.

However, working in this mode is convenient for debugging processing, but not quite suitable for the user. Users are accustomed to having everything “at hand”, that is, in the database itself.

For this, the section "Additional reports and processing" is used.

But to add our processing there, you first need to give it a description and tell the program its properties.

Description of the "Information About External Processing" function

I will give an example of the contents of this function. It must be exportable and, accordingly, located in the processing module:

External Processing Information () Function Export

DataForReg = New Structure ();
DataForReg.Insert ("Name", "Set VAT rate");
DataForReg.Insert ("SafeMode", True);
DataForReg.Insert ("Version", "ver .: 1.001");
DataForReg.Insert ("Information", "Processing for setting the VAT rate in the Nomenclature directory");
DataForReg.Insert ("View", "AdditionalProcessing");

CommandTable = New ValuesTable;
TabZnCommands.Columns.Add ("Identifier");
TabZnCommands.Columns.Add ("Usage");
TabZnCommands.Columns.Add ("View");

NewString = TabZnCommands.Add ();
NewStroka.Identifier = "OpenProcessing";
NewStroka.Usage = "Form Opening";
NewStroka.View = "Open processing";
DataForReg.Insert ("Commands", TabZnCommands);

Return Data for Reg;

EndFunction

To better understand which fields of the registration data structure you need to use, let's look at the details of the "Additional reports and processing" reference book:

As you can see, everything is pretty simple. Only one variable does not match: "Launch Option" - "Use". If you look at the code of one of common modules, then we will see how a bunch of these fields appears:

To determine which fields of a structure are required, you can first skip describing it, just create an empty one, and then use the debugger. If you trace the modules when registering processing, it becomes immediately clear which fields are required and which are not.

Connecting external processing in 1C 8.3

To work with external processing (and an external printable is also an external processing) there is an object ExternalProcessing.

Consider two possible cases:

External processing is stored on disk separately from the infobase

For program discovery external processing in 1C, you need to know the address of its file. Knowing it, you can either open the processing form, or get the processing object for further actions with it (for example, to call export functions from the object module).

Opening an external processing form

To programmatically open a form for external processing in 1C, use the function GetForm () object ExternalProcessing. The function has several parameters. Consider simply opening the main processing form:


Form = ExternalProcesses. GetForm (FileAddress);
Form. Open ();

To open a minor external processing form, you must specify its name.

// The FileAddress variable contains the full path to the external processing file
Form = ExternalProcesses. GetForm (File Address, "MinorForm") ;
Form. Open ();

Opening external processing as an object

In order to receive external processing as an object, use the function Create() object ExternalProcessing.

// The FileAddress variable contains the full path to the external processing file
TreatmentObject = ExternalProcessing. Create (File-Address);

By default, all treatments are opened in safe mode... To disable it, use the following options:

// The FileAddress variable contains the full path to the external processing file

External processing or printable saved in the infobase

In many configurations it is possible to keep external printed forms and processing directly in the infobase. For this, a reference is used. ExternalProcessing. The external processing itself is stored as binary data or in props StorageExternalProcessing, or in the tabular section Affiliation in props StorageExternalProcessing.

To open external processing you need:

  1. Get it out of storage.
  2. Save the processed file to disk.
  3. Open a form or get a processing object.
  4. If we are dealing with an external printed form, then you can fill in the standard requisite ReferenceObject and call the export function Seal.

// The variable RefLink contains a link to the ExternalProcessing catalog item
DVDData = QueryLink. StorageExternalProcessing. Receive() ;
FileAddress = GetTemporaryFileName ();
Dvdata. Write (File-Address);
TreatmentObject = ExternalProcessing. Create (File-Address, False);

Quite often, when during a consultation there is a need to resolve a difficult issue, I suggest my clients implement it in the 1C program using either external processing or external printing plate... And I often come across the fact that a person is simply not familiar with this possibility of programs on the 1C Enterprise 8. Sometimes they even swear at me, believing that the development and implementation of such processing in their configuration will lead to the impossibility of automatically updating the program. That you have to pay a lot of money to update the program.

To clarify such questions, as well as talk about what useful opportunities external processing and external printing forms provide, I decided to write this article. I will not consider in the article technical side processing creation process. This will most likely be discussed in another publication. Here I will try to explain the very essence of the mechanism and give specific examples of those cases where external processing and printing forms can benefit the user.

The article will discuss the following options for additional external pluggable objects:

  • Additional external processing of tabular sections;
  • Additional external printing plates;
  • Additional external reports;
  • Additional external treatments.

What are additional external processing, reports and printable forms




To begin with, I would like to talk in general about what are these external processing, reports and printing forms... Quite often, when working with a typical configuration, whether it is 1C ZUP or 1C Enterprise Accounting or some other configuration, there is a need for some functionality that is not provided by the developers of 1C. For example, you might need printed form, which is not regulated, but is used for the internal needs of the organization. Or is required in a certain way process (change, correct) available in the database. For example, to change a certain attribute in documents for the required period, which is inconvenient to do manually with large amounts of information.

In this case, there are two options. First, we can modify the configuration itself, the program itself. After that, it will cease to be typical and update it with those rather in simple ways, which I wrote about, will not work. Update atypical configuration- this is a longer and more serious process, therefore, with this approach, you will most likely have to pay a 1C specialist monthly for updating the program. Second an option is to develop or ask to develop an external processing or printed form (report). This is essentially an external module, which is also developed in the 1C programming language in the Configurator, but does not make changes to the typical configuration. It exists independently of the configuration itself. To store them, special reference books are used: the main menu item "Service" -> "Additional reports and processing".

Additional external processing for filling in tabular sections

Seminar "Life hacks on 1C ZUP 3.1"
Analysis of 15 life hacks for accounting in 1s ZUP 3.1:

CHECK-LIST for checking payroll in 1C ZUP 3.1
VIDEO - monthly self-check of accounting:

Payroll in 1C ZUP 3.1
Step-by-step instruction for beginners:

Now let's take a look at what capabilities each of the four available external modules will give us. Let's start with external processing of tabular sections... It seems to me that these processing of the tabular sections of documents most fully illustrate how you can seriously modify the program, while not resorting to editing the typical configuration, but using only external processing.

To make it clearer, I will give a specific example from my practice, in which I used external processing of tabular sections... In the configuration "1C Salary and Human Resources Management" version 2.5 there is a document "Payment for holidays and weekends"(this document has been written in detail). In its typical form, this document provides the ability to automatically fill in the tabular section by employees "Working on Holidays".

The accountant asked to implement the possibility of filling out this document by employees whose working days fell on weekends according to the schedule, i.e. "Working on the weekend".

This file has been uploaded to the directory "External processing of tabular sections"(menu item "Service" -> "Additional reports and processing" -> "Additional external processing of tabular sections"). When creating an element of this directory, it was indicated to which document the loaded processing applies - "Payment for holidays and weekends of the organization", as well as to which tabular section - "Employees". In our example tabular part the document has one, but in other documents there may be several of them, therefore, it is required to specifically indicate which of them the processing applies to.

As a result of adding this processing to the directory "Additional external processing for filling in tabular sections" in the document "Payment for holidays and weekends" there will be a button "Fill" with a drop-down list, in which it will be possible to start this processing. In our case, the button "Fill Sundays" is available in the drop-down list. Pressing it launches the algorithm that is being processed. V this example the tabular section will be filled in by employees whose working days fell on a day off. Please note that this button was not previously present (screenshot above).

This mechanism makes it possible to solve very wide circle questions without resorting to finalizing the configuration itself. Therefore, I quite often use this opportunity to implement client tasks.

Additional external printing plates

Seminar "Life hacks on 1C ZUP 3.1"
Analysis of 15 life hacks for accounting in 1s ZUP 3.1:

CHECK-LIST for checking payroll in 1C ZUP 3.1
VIDEO - monthly self-check of accounting:

Payroll in 1C ZUP 3.1
Step-by-step instructions for beginners:

This option is very similar to the previous one. You have most likely seen and know that almost every document and even some elements of directories have printable forms. They, as rules, are located in the lower right corner of the form of a catalog item or document. Sometimes standard printed forms are not enough. For example, an organization may have its own form of employment contract. Let me remind you that the standard printed form "Labor contract" is included in the form of the directory "Employees".

You can add your own to these printed forms of the reference book. For this, an external printable is created with the extension “.epf”. Then a directory element is created for it. "Additional external printing plates"(menu item "Service" -> "Additional reports and processing") and a file with the extension ".epf" is added to this element of the reference book. It is also necessary to indicate for which document or reference the processing is added.

As a result, another form will appear in the printed forms of the elements of the "Employees" directory - "Labor contract (LLC Alpha)", which did not exist before. And her appearance and filling with data is defined by the programmer in the “.epf” file.

This ability to add the necessary printable forms for documents and reference books is also very often in demand and, in my opinion, is a rather convenient functionality of programs on the 1C Enterprise platform.

Additional external reports

In this case, you can develop external report... It is an “.erf” file. It is this file that will determine the appearance of the report, what configuration data it will use, and what configuration data it will request from the user (for example, period, selection by employee or by department). The file is created in the 1C configurator in the 1C programming language.

An external report can be stored as part of a configuration using the "Additional external reports" reference (menu item "Service" -> "Additional reports and processing"). They are not related to a specific document or reference book, this information is not required.

With this storage option, the report is launched from the same directory (by double-clicking).

You can also launch an external report using the "File" -> "Open" menu item. This option can be used if it is more convenient for you to store external reports not within the program, but simply in computer folders.

Additional external treatments

External treatments have about the same meaning as external reports. But unlike reports, which are used to view infobase data in a user-friendly format, processing is designed to modify, edit, or transform data. information base... The range of tasks that can be solved using external processing is quite wide.

for instance, processing for unloading statements for payment wages... Despite the presence in the ZUP typical processing(read about it), sometimes it may not be suitable for a specific bank and external processing is being developed that converts and unloads information in the required format.

I will give one more example completely unpretentious, but quite demanded processing. If you do not keep the document “Transfer of personal income tax to the budget” in 1C ZUP during the year, then when forming 2-personal income tax for the year, the field “Enumerated” for each employee will be zero, which is usually actually incorrect. To enter the document "Transfer of personal income tax to the budget" for the whole year can be quite tedious, given the peculiarities of the document itself. But you can do external processing, which in the generated 2-NDFL will simply fill in the "Enumerated" field for each employee, based on the values ​​in the "Calculated" field. Usually accountants really like this option.

External processing have exactly the same two options for storing and launching: either use the reference "Additional external treatments"(menu item "Tools" -> "Additional reports and processing"), or the main menu item "File" -> "Open".

That's all for today!

To be the first to know about new publications, subscribe to my blog updates:

External processing is a very convenient tool for companies using typical configurations on 1C: Enterprise 8.3. They allow you not to waste time and money on 1C updates, making it possible to update the databases with one button in the mode common user... Using the library mechanism of standard subsystems, you can add various buttons to documents and reference books without changing the typical configuration. Let's consider an example of creating and connecting external processing in one of the 1C configurations.

We create external processing in 1C 8.3

To create a new external processing, use the configurator. Through the "File" menu, select the "New ..." creation command and decide that we will create external processing. In the window that opens, set the name, and when you press "Enter" it is filled in automatically. Also, the system will offer you this name as the file name when saving.

Add a processing form by clicking on the button with the magnifying glass in the corresponding window. For example, let's create a processing that shows which sales orders use a particular item. To do this, we need to place on the form:

  • Attribute - a field for setting the item;
  • The button that will execute the code call.

Add the "Nomenclature" attribute with the "ReferenceLink.Nomenclature" data type in the appropriate section and the "Show" button in the "Commands" -> "Form Commands" menu.

To reflect the added data on the form, you need to drag it to the form elements located in the upper left part. It is possible to swap items using the blue arrows. In order for the button we created to do what we intended, it needs to be assigned a procedure. Across context menu select "Command action", and to the question where the handler is needed, we will answer: "Create on the client and a procedure on the server".


Fragment 1

& OnClient Procedure Show (Command) ShowAtServer (); EndProcedure & AtServer Procedure ShowAtServer () // Insert the contents of the handler. End of Procedure

We chose to create a procedure on the server, since we want to receive a selection from the database as a result. On the client, we do not have such an opportunity, so we need to connect to the server, which exchanges data with the database. Now we need to write code that implements what we intended. Request and output of all documents through the "Report ()" function will be used.


Fragment 2

& OnClient Procedure Show (Command) ShowAtServer (Nomenclature); EndProcedure & AtServer Procedure ShowAtServer (Nomenclature) Request = New Request; Request.Text = "SELECT DIFFERENT | Customer's OrderComposition.Ref.Link AS Reference | FROM | Document.Client's Order.Content AS Customer's OrderComposition | WHERE | Customer's OrderComposition.Nomenclature = & Nomenclature"; Request.SetParameter ("Nomenclature", Nomenclature); QueryResult = Query.Run (); FetchDetailedRecords = QueryResult.Select (); While FetchDetailedRecords.Next () Cycle Report (FetchDetailedRecords.Link); End of Cycle; End of Procedure

At the current stage, we can open the external processing as an ordinary file in the launched 1C database, and it will already be operational. But if we have a lot of users, we will have to send them all this file, providing it with instructions on how to actually open it in 1C, which is extremely inconvenient. To avoid this, our processing should be located inside one of the 1C sections. To do this, we need to modify it a little more through the configurator, specifying certain settings.

To place external processing in section 1C, it is necessary for her to register the procedure "Information About External Processing" in the object module. In the main processing menu, click "Actions" and select "Object module". Here it is necessary to register all the settings necessary for 1C so that the system understands what is required of it and what kind of file is in front of it. The screenshot shows the code for the "ExternalProcessing Information" function.

ExternalProcessing Information Function () Export DataForReg = New Structure (); DataForReg.Insert ("Name", "New external processing"); DataForReg.Insert ("SafeMode", True); DataForReg.Insert ("Version", "ver .: 1.001"); DataForReg.Insert ("View", "AdditionalProcessing"); CommandTable = New ValuesTable; TabZnCommands.Columns.Add ("Identifier"); TabZnCommands.Columns.Add ("Usage"); TabZnCommands.Columns.Add ("View"); NewString = TabZnCommands.Add (); NewString.Identifier = "NewExternalProcessing"; NewStroka.Usage = "Form Opening"; NewStroka.View = "New external processing"; DataForReg.Insert ("Commands", TabZnCommands); Return Data for Reg; EndFunction

Fragment 3

Connecting external processing in 1C

Before connecting external processing to a typical configuration, you must enable the use of this tool. In the "Administration" in the sub-item "Printing forms, reports and processing" set the flag opposite the mechanism we need. The button for switching to the reference book of additional processing and reports becomes available to us.


When we go to the list, create a new line in it, and the system will offer to select a file. We select the processing that we have made and saved, and the 1C configuration independently fills in most of the fields. Through the "Run" button, we can already check the performance of our processing, but this is not very convenient for other users. In order for users to have our team, and they can make a call, we need:

  • Indicate the location of the object. By clicking on "Not defined" we open the sections window and indicate in which sections the operation will be available;
  • Select users for whom this command will appear in the "Additional processing" menu of the selected sections without unnecessary settings. To do this, in the tabular section, select the item " Fast access»And add responsible users to the right half;
  • On the tab “ Additional Information»You can specify the folder where the downloaded processing will be located;
  • After pressing the "Write" button in the selected section in the "Additional processing" menu, users will find our command and will be able to use it.

If we want to make changes to our processing, we must first unload it from the database. To do this, find the required line in the "Additional processing and reports" reference book and use the "Upload to file ..." command. Make changes, save the processing and use the "Load from file ..." button to find the modified epf file without changing the parameters. After recording, all users will see the changes made.

If you are using a non-standard or removed from support 1C base, then use the opportunity to load processing through the configurator. In the tree of objects in the "Processing" section, create a new processing and through the context menu select "Replace with external processing, report ...". All that remains is to configure the launch of external processing from the required section by including the added processing in the required subsystem.


Working with external processing is very convenient and avoids many conflicts. Their only significant drawback is that they are not automatically updated along with the configuration. That is, if the developers have changed the name of a document or reference in the main configuration, we will have to manually configure the processing.

Go to the top of the menu Service->->.

The form of the list of the reference book of external processing appears. In the top menu, press the button Add.

A form for adding a new object will appear. We press the open button, and select the file with the desired processing. After you have chosen desired file, if necessary, specify the name of the treatment (Name field). After that, you need to click OK to save the changes made.

After that, the window for creating a catalog item is closed, and you are taken back to the list form, in which there is already a new processing.

That's all! The process of adding processing to the configuration is complete. To open this processing later, follow the old path: Service->Additional reports and processing->Additional external treatments.

For BP 3.0, ZUP 3.0, UT 11, ERP 2.0.

External treatments for 1C: Enterprise 8 are of several types. In this tutorial, I will show you how to attach processing for batch modification and processing for filling specific objects.

For the first case, let's add processing for filling out the stock list from Excel.

Go to the appropriate section of the program:


It is necessary that the use flag has been set additional reports and processing, follow the hyperlink to the list of external objects:

In the list, click Create:


In the dialog box that opens, select the desired file with processing:


The new card has been filled in external object in the program, it remains only to configure accommodation(sections of the program from which processing will be available):


Select an arbitrary section (or several) as placement:


We write down and close the card of the external object:


Now let's open processing from the interface:


The list is empty, click Customize list:


We choose our processing:


It is now available for selection. To open processing, you need to click Execute:


Now let's see how processing for filling (modifying) specific objects is added. For example, let's take an external processing that attaches scans to selected elements of directories or documents of the system. The beginning of adding such processing does not differ from the previous option. The difference is that in this case the location is filled in automatically (and not by the program section, but by the types of database objects):


If desired, the placement list can be adjusted ( do not add additional placement, but remove unnecessary):


To accept the change, the card of the external object must also be recorded.

In order to use the processing, you need to go to a specific base object (from the placement list), click Fill in the command panel and select the command:

Payment details Cost, licensing, use by several users Product cost - 0 rubles. The number of jobs is unlimited. No additional licensing required. What are the payment options? You can pay from a bank card (Visa, Mastercard or Mir), a Yandex wallet, or send the TIN of your organization for invoicing (from an individual entrepreneur). When paying from a legal entity, covering documents are provided, if necessary. Is payment on the site safe? Payment by credit card or through a Yandex wallet on this site is absolutely safe. The site has an SSL certificate - a unique digital signature for reliable protection when transferring data. How to get a file after payment? After payment, you will be automatically sent an email within one minute with a link to download the product (you specify your address when paying).

Technical Issues How to add a product to the database? You can implement the product yourself by looking at the instructions. If you have any difficulties with this, I can help. Contact me and we will schedule a specific time to contact you. If the development does not start (or will work incorrectly) In this case, first of all check according to the instructions whether you have connected the development correctly. If the check yielded nothing, make a screenshot of the error and send it to me by mail indicating the name of the development. At your choice, I can either correct the error and send new version file, or get your money back. If the development breaks after the update, you will need to contact me with the number of the new release of your configuration and the name of the development you purchased. After that I will send an adapted version of the file by mail. Is it possible to finalize the development on your own? Yes, you can. Source open and available for any revision, there are no restrictions. Are there any configuration changes? No, the implementation of the development does not change the configuration of the database in any way and will not be reflected in subsequent updates. Is there a demo version? No, I can't provide demo access to development.

Other questions Sale of developments outside working hours / holidays / weekends Sale on the site is carried out automatically around the clock, seven days a week, holidays and lunch breaks. Are the developments updated? Some developments are updated and improved from time to time. Whenever a product is updated, you will receive email alerts with a description of the changes and a download link (free). You also have the opportunity to send your wishes for improvements. Are closing documents provided? When paying by invoice, an act of completion is provided with a seal and signature (scan and / or original by Russian Post, upon request). Refunds Cash for the purchase of site developments are returned immediately in full in the following cases:

  • development does not start or works with errors in your database, and you refuse to adapt it,
  • the development does not correspond to the functionality stated in the description.

Having a problem with your payment?

Payment on the site works on the basis of the Yandex payment service. If it does not work for you, I can assume that you are not in Russia, and Yandex does not work in your country (or is unstable).

What to do?

You can pay alternative ways:

  • Sberbank card: 4276 3000 2875 5851
  • Yandex wallet: 410011805420743

Be sure to include Product ID 68 and your address in the note to the payment Email, where I will then send a link to download the development.