1c creation of external processing. Adding external processing to the database. Description of the function “Information about External Processing”

Go to the top menu Service->->.

The external processing directory list form appears. In the top menu press the button Add.

The Add New Object form will appear. Click the open button and select the file with the desired processing. After you have selected the desired file, if necessary, specify a processing name (Name field). After this, you need to click OK to save the changes made.

After this, the window for creating a directory item closes, and you are taken back to the list form, which already contains the new processing.

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

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

External processing for 1C:Enterprise 8 comes in several types. In this instruction, I will show you how to attach processing for group modification and processing for filling specific objects.

For the first case, we will add processing for filling out the nomenclature directory from Excel.

Let's go to the appropriate section of the program:


It is necessary that the flag for using additional reports and processing is set; follow the hyperlink to the list of external objects:

In the list click Create:


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


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


Select an arbitrary section (or several) for placement:


Write and close the external object card:


Now let's open processing from the interface:


The list is empty, click Customize the list:


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 external processing, which attaches scans to selected elements of directories or system documents. The beginning of adding such processing is no different from the previous option. The difference is that in this case the placement 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 external object card must also be written down.

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

External processing is a very convenient tool for companies using standard configurations on 1C:Enterprise 8.3. They allow you not to waste effort and money on 1C updates, making it possible to update databases with one button in simple user mode. Using the standard subsystem library mechanism, you can add various buttons to documents and reference books without changing the standard 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, we use the configurator. Through the “File” menu, select the creation command “New...” and determine that we will create external processing. In the window that opens, set the name, and when you press “Enter,” it is filled in automatically. The system will also offer you this name as the file name when saving.

Let's add a processing form by clicking on the button with a magnifying glass in the corresponding window. For example, let's create a processing showing which customer orders use a certain item. To do this, we need to place on the form:

  • Attributes – field for setting the nomenclature;
  • A button that will call the code.

Add the “Nomenclature” attribute with the data type “DirectoryLink.Nomenclature” in the corresponding section and the “Show” button in the “Commands” -> “Form Commands” menu.

In order for the added data to be reflected on the form, you must drag it into the form elements located in the upper left part. It is possible to swap elements using the blue arrows. In order for the button we created to do what it intended, it needs to be assigned a procedure. Through the context menu, select “Command Action”, and when asked where the handler is needed, we will answer: “Create on the client and a procedure on the server.”


Fragment 1

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

We chose to create a procedure on the server because we want to receive a sample from the database as a result. We do not have this option on the client, so we will need to connect to the server, which exchanges data with the database. Now we need to write code that implements what we have planned. The request and output of all documents through the “Report()” function will be used.


Fragment 2

&OnClient Procedure Show(Command) ShowOnServer(Nomenclature); EndProcedure &OnServer Procedure ShowOnServer(Nomenclature) Request = New Request;

Query.Text = "SELECT VARIOUS | Customer OrderComposition.Link AS Link | FROM | Document.Customer Order.Composition AS Customer OrderComposition | WHERE | Customer OrderComposition.Nomenclature = &Nomenclature";

Request.SetParameter("Nomenclature", Nomenclature);

Function InformationOnExternalProcessing() 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 = NewValueTable;
  • TabZnCommands.Columns.Add("Identifier");
  • TabZnCommands.Columns.Add("Usage");
  • TabZnCommands.Columns.Add("View");

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” directory 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 discontinued 1C database, then take advantage of the opportunity to download processing through the configurator. In the object tree, in the “Processings” 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 desired section, including the added processing in the desired subsystem.


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

Configuration Section: Application Objects

Let me make a reservation right away: this material is more suitable for configurations developed using controlled forms. However, the general principles are the same for all forms.

To create an external processing or report, you just need to select the File/New menu and select the type of processing or report. After creating the processing, in principle you can already use it. But in order to connect it to a standard configuration as additional processing or reporting, this is not enough.

To do this, you must register several procedures in the processing module. Their general meaning boils down to the fact that you let the configuration know what kind of processing it is (processing, report, printed form, filling out a tabular section, etc.), and you also indicate in which subsystem it should be located.

Below is this code. For your processing you need to change several parameters.

Well, first of all, this is the version and name of the processing, as well as the name of the command. As I already wrote, you need to specify the subsystem where it will be located or a specific object (directory, document).
Also the type of processing and mode of use. Safe mode does not allow changes to be made to the database.

Function InformationOnExternalProcessing() Export
// Let's declare a variable in which we will save and return the necessary data "outside"
Registration Parameters = New Structure;

// Let's declare another variable that we will need below
ArrayDestinations = New Array;

// The first parameter we must specify is what type of processing the system should register.
// Valid types: AdditionalProcessing, AdditionalReport, FillingObject, Report, PrintForm, CreatingLinkedObjects
Registration Parameters.Insert("View", "AdditionalProcessing");

// Now we need to pass in the form of an array of names what our VPF will be connected to
// Keep in mind that you can set the name in the following form: Document.* - in this case, processing will be connected to all documents in the system,
// which support the VPF mechanism
Array of Assignments.Add("Subsystems.RegulatedAccounting");
Registration Parameters.Insert("Destination", Array of Destination);

// Now let's set the name under which the VPF will be registered in the external processing directory
Registration Parameters.Insert("Name", "Analysis of negative balances by register");

// Set the processing right to use safe mode. More details can be found in the platform help (SetSafeMode method)
Registration Parameters.Insert("SafeMode", True);

// The next two parameters play more of an informational role, i.e. this is what the user will see in the information for processing
Registration Parameters.Insert("Version", "1.0");
Registration Parameters.Insert("Information", "Analysis of negative balances by registers");

// Create a table of commands (see details below)
CommandTable = GetCommandTable();

// Add a command to the table
Add Command(Table of Commands, "Analysis of negative balances by registers", "Analysis of negative balances by registers", "Opening Form");

// Save the table of commands to the processing registration parameters
Registration Parameters.Insert("Commands", CommandTable);

// Now let's return our parameters to the system
ReturnRegistrationParameters;
EndFunction

Function GetTableCommand()

// Create an empty command table and columns in it
Commands = New ValueTable;

// What the description of the printed form will look like for the user
Commands.Columns.Add("View", NewTypeDescription("Row"));

// The name of our layout, so that we can distinguish the called command in print processing
Commands.Columns.Add("Identifier", New TypeDescription("String"));

// This sets how the processing command should be called
// Possible options:
// - OpeningForm - in this case, the identifier column should indicate the name of the form that the system will open
// - CallClientMethod - call the client export procedure from the processing form module
// - Call ServerMethod - call a server export procedure from the processing object module
Commands.Columns.Add("Usage", New TypeDescription("Row"));

// The next parameter specifies whether a notification should be shown when a processing job starts and ends. Doesn't make sense when opening the form
Commands.Columns.Add("ShowAlert", NewTypeDescription("Boolean"));

// For a printed form, it must contain the string PrintMXL
Commands.Columns.Add("Modifier", New TypeDescription("Row"));
Return Team;
EndFunction

Procedure AddCommand(CommandTable, View, Identifier, Usage, ShowAlert = False, Modifier = "")
// Add a command to the command table according to the passed description.
// Parameters and their values ​​can be viewed in the GetCommandTable function
NewCommand = CommandTable.Add();
NewCommand.View = View;
NewCommand.Identifier = Identifier;
NewCommand.Use = Use;
NewCommand.ShowAlert = ShowAlert;
NewCommand.Modifier = Modifier;

In this article, we will consider step-by-step instructions for creating external processing in 1C 8.3 in managed application mode; accordingly, 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 a library of standard subsystems version 2.0 and newer.

The task will be the following: to create the simplest external processing that will perform a group action on the “Item” directory, namely, set the selected VAT rate percentage for the specified group of items.

To do this, we will immediately make the necessary settings in the program (we are considering the 1C 8.3 configuration: “Enterprise Accounting 3.0” on managed forms).

Checking this box gives us the opportunity to use external processing.

Creating a new external processing in 1C 8.3 using an example

Now let's go to the configurator. In the "File" menu, select "New...". A window for selecting the type of file to be created will open. Select “External processing”:

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

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

We will have two details on the form:

  • Nomenclature group – link to the “Nomenclature” directory;
  • SelectVATRate – link to the transfer of the VAT Rate.

We create details in the “Properties” column in the upper right window. Drag them with the mouse into the upper left window. The new details should immediately appear on the form below.

The order of details can be changed using the “Up” – “Down” arrows:

Get 267 video lessons on 1C for free:

All that remains is to add the “Install” button. In managed forms, you can't just add a button to the form. Even if you add it to the structure of the 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 “Set VAT Rate” command. In the command properties, create an action. Select the command handler “On the client”. A command can also be added to the form by simply dragging it into the section with form elements.

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

&OnClient

Procedure Set VAT Rate (Command)

SetVATRateOnServer();

EndProcedure

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

&On server

Procedure SetVATRateOnServer()

Request = New Request;
Request.Text =
"CHOOSE
| Nomenclature.Link
|FROM
| Directory.Nomenclature AS Nomenclature
|WHERE
| Nomenclature.Link IN HIERARCHY (&Nomenclature Group)
| AND NOT Nomenclature.MarkDeletion
| AND NOT Nomenclature. This is a Group”;

Request.SetParameter("Item Group", Item Group);
ResRequest = Request.Execute();
SelectRecordDet = ResRequest.Select();

While SelectRecordDet.Next() Loop

Attempt
SprNomObject.Write();
Exception
Report("Error writing object """ + SprNomObject + """!
|» + DescriptionError());
EndAttempt;

EndCycle;

EndProcedure

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

As such, our processing is ready for 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 is not entirely suitable for the user. Users are accustomed to having everything “at their fingertips,” that is, in the database itself.

This is what the “Additional reports and processing” section is for.

But in order to add our processing there, we must first give it a description and tell the program its properties.

Description of the function “Information about External Processing”

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

Function InformationOnExternalProcessing() Export

DataForReg = New Structure();
DataForReg.Insert("Name", "VAT rate setting");
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 = NewValueTable;
TabZnCommands.Columns.Add("Identifier");
TabZnCommands.Columns.Add("Usage");
TabZnCommands.Columns.Add("View");

NewRow = TabZnCommands.Add();
NewString.Identifier = "OpenProcessing";
NewRow.Use = "OpenForm";
NewRow.View = "Open processing";
DataForReg.Insert("Commands", TabZnCommands);

Return DataForReg;

EndFunction

To better understand which fields of the registration data structure need to be used, let’s look at the details of the “Additional reports and processing” directory:

As you can see, everything is quite simple. Only one attribute does not match: “Launch Option” – “Use”. If we look at the code of one of the common modules, we will see how a bunch of these fields arise:

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

Connecting external processing in 1C 8.3