1s 8.3 open the outer form of the sound. Adding external signal to the base

In this article, we look at the instructions for creating new processing in 1C 8.3 in the cerated additive mode, which is similar to the cerated form. And above all, we can easily connect them to the mechanism of external 1C configuration processing, based on the library of standard subsystems version 2.0 and newer.

The task will come soon: create the simplest external procedure, which is to complete the group action over the “Nomenclature” agent, and itself, set the selection of the maximum allowance rate for the designated group of nomenclature.

For this purpose, it is absolutely necessary to adjust the program (see configuration 1C 8.3: “Business Accounting 3.0” on ceramic forms).

Setting this proportion makes it possible to vikorize external processing.

Creation of a new modern design of 1C 8.3 on the butt

Now let's move on to the configurator. From the "File" menu, select "New...". The window for selecting the type of file created will open. Select “External processing”:

A window of a new, new design will open. We’ll immediately put her name on it. Here you will be awarded for saving the material on disk:

Dodamo new kerovanu form obrobki. It is clear that this is the main form of processing:

On the form we will have two details:

  • Nomenclature Group – sent to the “Nomenclature” document;
  • VibRate MDV - poslannya on re-raising the Rates MDV.

You can create details in the “Details” column in the upper right window. We pull the bear over them at the top left window. New details will immediately appear on the form below.

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

Watch 267 video lessons from 1C free of charge:

I forgot to add the “Install” button. With ceramic forms, you cannot simply add a button to the form. If we add it to the structure of the form elements, it will not be visible on the form itself. The obov'yazkovo button needs to be connected with the command, so you can use it. We go to the “Commands” tab and add the command “Set MDV Rate”. The power of the team creates action. The command source is selected “On client”. The command can be added to the form by simply dragging it into the section with the form elements.

A single procedure will be created for the form module. It has a procedure on the server:

&On Client

Procedure for Setting the MDV Bet (Command)

SetBetPDVServer();

KinetsProcedures

For the procedure on the server, we will write a small command and actions related to the established MDV rate:

&On the server

Procedure SetBet PDVServer()

Zapit = New Zapit;
Request.Text =
"VIBRATI
| Nomenclature.
|Z
| Dovidnik Nomenclature YAK Nomenclature
|DE
| Nomenclature.Posilannya IN ІЄARCHІЇ (&GroupNomenclature)
| І NOT Nomenclature.
| І NOT Nomenclature. Tse Group";

Request.InstallParameter("Item group", item group);
ResRequest = Request.Execute();
VibDetRecords = ResRequest.Vibrate();

Poki VibDetRecords.Offensive() Loop

Try
SprNomObject.Write();
Blame
Notify("Agreement to the record of the object """ + SprNomObject + """!
|» + DescriptionPomilki());
KinetsProby;

KіnetsCycle;

KinetsProcedures

Turn to the “Form” tab and add a button to the form that is associated with the command:

So our outfit is ready for the vikoristan. To click on it, in the “1C Business” mode you need to go to the “File” - “Open” menu and select the creation file.

However, the robot in this mode is handy for the development of processing, but it is not entirely suitable for the robot. The koristuvachs called, so that they had everything at their fingertips, then in the very database.

What is the purpose of the section “Additional information and reports”.

Before we can add our report there, we need to first describe it and inform the government’s program.

Description of the function “Views about current processing”

I’ll point the butt instead of this function. This can be exported and, obviously, will be expanded in the processing module:

Function ViewViewExternalProfile() Export

DataForReg = New Structure();
DataForReg.Insert("Name", "Setting the MDV rate");
DataForReg.Insert("SafetyMode", True);
DataForReg.Insert("Version", "ver.: 1.001");
DataForReg.Insert("Information", "Processing for setting the MDV rate for the agent Nomenclature");
DataForReg.Insert("View", "Dodatkova Obrobka");

TableValueCommand = New TableValue;
TabZnCommand.Columns.Add("Identifier");
TabZnCommand.Columns.Addati("Vikoristannya");
TabZnCommand.Columns.Addati("Submission");

NewRow = TabZnCommand.Add();
NewString.Identifier = "Unclick";
NewRow.Vikoristannya = "VidkrittyaFormi";
NewString.Presentation = "Open the view";
DataForReg.Insert("Command", TabZnCommand);

Return DataForReg;

EndFunctions

To better understand which fields of the registration data structure need to be analyzed, let’s take a look at the details of the “Additional information and processing” report:

Yak bachimo, it’s easy to finish everything. There is only one detail missing: “Launch Option” - “Vicoristannya”. If we see the code of one of the hidden modules, then we can see how these fields are connected:

To determine which fields of the structure are obligatory, you can not describe them at first, just create them empty, and then quickly become a handler. As you transfer modules during processing registration, it immediately becomes clear which fields are needed and which ones are not.

Connecting external processing up to 1C 8.3

From the top menu go to Service->->.

After this, the form will appear on the list of advisers. At the top menu press Add.

It became possible to add a new light. Pressing the button Vidkriti.

Select the file with the required sound and press Vidkriti. After adding a file, if necessary, change the name of the file (as it will appear in the list). Onslaught OK.

As a result, a new item appears on the list.

After this, you can speed up, the addition is complete. To then open this sound, we also go to Service->Additional information and details->Additional external calls.

For BP 3.0 ZUP 3.0 UT 11 ERP 2.0.

To add new information to the 1C:Enterprise 8.3 configuration in the ceramic interface (on the Accounting 3.0 application), go to the following section of programs:


It is necessary that you turn on the sign of additional information, go to the hyperlinks:

Press the button on the list Creativity:


After this, a dialog box will open where you can select the file from which you need to select the required file (in my selection there is a file from the plan-factual analysis of expenses).

Now we need to adjust accommodation(wherever the program is available),


Please select the required program section from the list:


Now you need to write down the changes to the external call card:

Now the sound can be opened from the program interface:


The list is still empty, we are pressing Nalashtuvati list:


In the selection form, our name is ticked:


Now you have appeared on the list:


Behind the button Viconati The shape of the sound appears:


Let's take a look at the creation of the new world 1s 8 without the use of a data composition system. To create a new world, we will use the Accounting 2.0 configuration. Counterpartiesі Contracts of counterparties.

1. Creation of the world

We will first create the external sound file, for which we will go to 1s 8 in mode Configurator, let's go to the menu File -> New, or we’ll press it onto the pictogram new document.

Let's take a look at the list External sound. After the creation of the external world, I will ask you (for example The simplest sound) and save it to disk. We also add two details: Cob periodі End of the Period type date, we need them to divide the hourly interval of data selection for forming the call.

2. Creation of a model of the external world

p align="justify"> To form a report in 1C 8, you need a layout, a template for displaying data in which all the necessary parameters are set, tables are drawn, etc. A new layout has been added, for which in the metadata tree select the item Maketi press the button Add, when folded, cover for layout type Spreadsheet Document.

Our layout will have 4 areas:

  • Header - in this area we display the name of the name, the period for which year of formation and the header of the table;
  • Counterparty data - in this area we display data on the counterparty in the table;
  • Data of the Contract to the Counterparty - in this area we display the data for the counterparty’s agreement in the table;
  • Basement - in this area we display the sub-bag values ​​for each field for the fields Arrival and Witrata.

Let's start creating the layout areas. To create an area in the layout, see the required number of rows and click Menu Table -> Names -> Assign names(Or Ctrl+Shift+N). To the region A cap Let's write to the name: Wrap 62 shells, we ask for an additional tool between I call the header, and also set the parameters Cob periodі End of the Period. Using additional parameters, you can display the required data, which we will deal with at the next stage of development, and when writing the program code itself. To create a parameter for a layout, select the required company, write the name of the parameter (without spaces), click on it with the right mouse button, and select the item from the menu Authority. The authorities have mortgaged commerce Layout select refill Parameter.

After this, in the sale the name of the parameter will be placed at the temple temple ("<>“). The result area A cap it might look like this:

In the area DaniContractor configurable parameters for entering the name of the counterparty, as well as for incoming and spending for account 62, for additional tools between Let's design the area to look like a table row.

In the area Data Agreement to the Counterparty We can create the parameters for entering the name of the contract, as well as for the receipt and spending of the account 62, using the additional Cordoni tool, we will create an area in the form of a table row. Very small access in front of the parameter Agreement to Counterparty(You can use the help of the distribution and distribution of middle prices. Right-click on the trade -> Unite or else Break the deal), it was necessary to see that the row behind the contract is located below the hierarchy and below the row behind the counterparty.

In the area Basement configurable parameters for bags upon receipt and expiration.

As a result, we can produce a layout like this:

3. Creation of the form of the world

To display data, specify the forming period and buttons Formulate Our world will need a form. To create the form, find the item in the external metadata tree Formie and press the button Add. On the first page of the form designer, you don’t need to make any changes, just click the button Dali.

On the next page of the designer there are a lot of available details ( Cob period, End of the Period) for molding on the form.

The result will have the following form:

Although in this way she doesn’t control us, we’ll make some changes before her:

  • Let's drag the button Formulate from the bottom panel to the top (so it’s easier for the painter);
  • Let's stretch the shape vertically and horizontally;
  • We are growing the fields Cob periodі End of the Period horizontally;
  • Add a control element to the form Field of a spreadsheet document (our name will be displayed in the new one), specify its name TabDoc;
  • Click on the button to select a period (if pressed, a dialogue will appear for you to manually select the required period). We won’t write the program code for it yet, so we’ll simply expand the button in order from the period fields.

As a result, our matime form looks like this:

4. Programming

After creating the form, we will proceed to programming. Let’s first create the procedure for displaying the dialogue by selecting a period (the button for which we have already created at the next stage). Right-click on the button and select the menu item Authority, at the authorities of the button let's go to the bookmark Podii, where you can use the additional buttons with a magnifying glass icon to complete the procedure Button1Push at the form module.

You can navigate between the form and module using the tabs at the bottom of the form

To select a click form, the period is quickly followed by a standard procedure Accounting 2.0 From the halal module Work with Dialogs - ObbrnikAdjusting the Period of Pressure, before it, as parameters you need to transfer the details to the caller Cob periodі End of the Period.

Procedure Button1Push(Element) Working with Dialogues. KinetsProcedures

Now let's move on to writing the code that forms and outputs our call. The form module already has a procedure ButtonFormulatePress, which is displayed when the button is pressed Formulate, there we will write our code. Let's finish with the necessary changes. We will make a change beforehand for spreadsheet document fields In this way we display the data, but it’s not complicated, it’s just that we record the data as short as possible, which means the program code will be easier to read.

TabDoc = ElementiForm.TabDoc;

We can remove the layout of the external light by speeding up the function OtrimatiLayout(<ИмяМакета>) , the parameter is passed to the name of the layout, and if such a layout exists, then the function will find it.

Layout = OtrimatiLayout("Layout");

After the layout is cut out, it can be changed for the skin of the other areas, which can be quickly done using the layout method OtrimatiArea(<ИмяОбласти>) .

AreaHeader = Layout.OtrimatiArea("Header"); AreaDani_Counterparty = Layout.OtrimArea( "DaniKontragent"); AreaDaniAgreement = Layout.OtrimArea("DaniAgreement"); FooterArea = Layout.OtrimatiArea("Basement");

Let's clear the field of the spreadsheet document. This is necessary in order for the old data to be visible when the new form is applied to the skin.

TabDoc.Clear();

Now that the initialization of the changes is completed, let’s move on to filling out and displaying the layout areas step by step. Let's get this out of the hat. As you remember, we created two parameters in this area Cob periodі End of the Period, we will hand over the important period of formation of the report, for which we will speed up the authorities Parameters area of ​​the layout.

AreaHead.Parameters.CobPeriod = CobPeriod; AreaHeader.Parameters.EndPeriod = EndPeriod;

More activities in the area A cap A sampler is not required, so you can see this field before the spreadsheet document.

TabDoc.Vesti(AreaHead);

Next, let’s get down to writing, using the data base, for help we’ll take the phrase behind the rack 62 from the accounting register Gosprozrakhunkovy. It is important to remember what kind of drink we will have.

Zapit = new Zapit;

Before printing, the written text will be transferred to the new required parameters. The fragments of our writing will be washed down by rahunku 62 accounting form, then we will first create a parameter for the new

Request.InstallParameter("Rakhunok62" ,PlaniRakhunkiv.Gosprozrakhunkovy.KnowByCode("62" ));

It is also necessary to transfer the formation period to the signal. Don’t forget that for the molding period we need special details, which are passed as parameters.

Request.SetParameter("CobPeriod", CobPeriod); Request.SetParameter("EndPeriod",EndPeriod);

Let's get started with writing the text, we'll work with the help of a query constructor. A lot of beginners write that you need to write a question and manually and use a constructor, but in practice this is not the case. In projects that are constantly in front of the 1C program, the priority is to clearly and clearly write the code, and when you write to the base manually, it is practically impossible to reach it, you will waste a lot of expensive hours to do it correctly I’ll wash down all the designs, know what drukar’s blessings are you earned money while writing this. So, don’t waste an hour trying to write it by hand, but use the constructor to write it down. We will spare your time and allow you to write complex letters without much effort. To start writing the text, let’s write in code:

Request.Text = "";

After this, place the cursor between the paws, press the mouse button to the right and select the item Constructor I'll ask. The popup designer window will open.

Now we need to select the 1C 8 database table we need. We need a virtual table Turn over accounting register Gosprozrakhunkovy. We know it on the left side of the designer window

Let's move it to the area Tables Let’s start filling in the parameters. For all virtual tables, there is a special set of parameters that allows you to select the required data from the main table (in our type, the main table is Accounting Register Gosprozrakhunkovy). The virtual table parameters window opens.

Remember the parameters, the period of which we transferred to the power supply. To specify a text parameter, write a symbol before the text name. ampersand(&)

It became impossible to store the brains behind the rack. appearance. For which we know the row in the parameters of the virtual table Umova Rakhunku and we’ll write there

Rakhunok V ІЄARCHІЇ (&Rakhunok62)

You can also quickly use the mind set designer by pressing the button with three dots.

There is no need to add any more minds to the virtual table, then press the button OK in the virtual table parameters window. Next you need to select the required fields from the table Gosprozrakhunkovy.(and itself: Counterparty, Counterparty Agreement, Income and Vitrat). To view the list of fields available in the table we have selected, click the “+” symbol next to its name. After this, we will drag the required fields into the right area of ​​the query designer, which is called: Fields. If we open the plan for the accounting departments, we are sure that 62 analytics To the counterparty - tse Subconto1, and for Contract to Counterparty - Subconto2.

Therefore, from the fields of the virtual table you can select Subconto1і Subconto2. Since we need income and expenses for the bag, then we select the same fields AmountTurnoverDtі SumaObigKt

Remember the pseudonyms of the fields we have chosen, for which we will go to the tab Communication/Pseudonyms and set the required field names.

Since in our world the data will be displayed hierarchically (the counterparty is on the first level, and all of its contracts are on the other), then we adjust the display of data in the hierarchy for additional subdivisions. Let's go to the designer's tab Pouches. At the group field we will tighten sequentially Counterpartyі Agreement to Counterparty, and bags Parafiaі Vitrata.

When the robot is completed in the constructor, press the button OK And it is important that the text of our application appears in the program code.

Request.Text = "VIBRATI" | GosprozrakhunkovyOrot.Subkonto1 YAK Counterparty, | GosprozrakhunkovyTurnover.Subconto2 YAK Contract to Counterparty, | GosprozrakhunkovyTurnover.SumTurnoverDt YAK Prikhid, | GosprozrakhunkovyTurnover.SumaTurnoverKt YAK Vitrata|Z | Register of Accounting.Gosprozrakhunkovy.Turnover (&Earth of the Period, &Ents of the Period, Rakhunok V ІЄARARCHY (&Rakhunok62),) YAK GosprozrakhunkovyOberti|PIDBAGS | SUMA(Coming), | SUMA (Vitrata) | Software | Counterparty, | Agreement to Counterparty";

Now that we have finished writing the question, let’s move on to filling up the areas DaniContractor, DataAgreementCounterpartyі Basement. All these areas will be completely erased at the end of the day. Our fragments will take revenge on grouping ( Counterpartyі Agreement to Counterparty) Vibere with the new tribute to the upcoming rite:

Vibirka Counterparty = Request.

In this manner, we remove records from pouches from all counterparties.

Before bypassing the sampling data in the next cycle, we introduce the following changes for cleaning the hidden bags behind the sound:

Zagalniy Prikhid = 0; Zagalna vitrata = 0;

In order for the data to be displayed with hierarchy (and spread by “+”), set the principle of auto-grouping rows of the spreadsheet document:

TabDoc.StartAutoGroupedRow();

All preparations are completed, now let’s look at the results of the query. The bypass will be carried out in an additional cycle Buwai

Until VibirkaContractor.Offensive() Cycle EndCycle ;

The parameters for the cob cycle were reset Parafiaі Vitrata regions DaniContractor. What is this needed for? We are aware of the situation behind the counterparty Uncle Vasya, arrival 10, and outflow 5, followed by the offensive counterparty Uncle Petya There is no money coming in or spending, because we can’t reset the parameters Parafiaі Vitrata, then in a row by counterparty Uncle Petya spend incoming 5 and outgoing 10.

AreaDataContractor.Parameters.Receipt = 0; AreaDataContractor.Parametri.Vitrate = 0;

After whom we will remember the area DaniContractor selection element data

Save PowerValue(DataAreaCounterparty.Parameters,SelectCounterparty);

After filling in the data, you can display the area in Spreadsheet Document, Since we use automatic grouping of rows, it is necessary to indicate the row level in the grouped row (our row will have two levels, for counterparties the first for contracts).

TabDoc.Vesti(AreaDataContractor,1);

Now for this counterparty we will select a selection for your contracts.

VibirkaAgreement to Counterparty = VibirkaContractor.Select(BypassRequestResult.Grouped);

The bypass will be carried out in an additional cycle Buwai.

Until VibirkaAgreementCounterparty.Offensive() Cycle EndCycle ;

Parameters for the cycle of counterparty agreements have been reset Parafiaі Vitrata, reserve area DaniDogovir From the selections, we display them in a spreadsheet document for another level of records.

AreaDataContract.Parameters.Incoming = 0; AreaDataAgreement.Parameters.Witrate = 0; SaveAuthorityValues(AreaAgreementData.Parameters,SelectCounterpartyAgreement); TabDoc.News(RegionDaniAgreement,2);

Also, in this cycle, until the change in the size of the pouches, the value must be added to the exact value.

Incoming Bag = Incoming Bag + Select Contract to Counterparty.Incoming; Vitrat Pouch = Vitrat Pouch + Vibir Agreement to the Counterparty. Vitrata;

What is the source of data in the area? DaniContractor, DataAgreementCounterparty completed, failed to complete the auto-grouping of rows in a spreadsheet document.

TabDoc.FinishAutoGroupedRows();

Entire cycles represent the display of data in the area DaniContractorі DataAgreementCounterparty look like this:

TabDoc.StartAutoGroupedRow(); Until VibirkaContractor.Offset() Cycle AreaDataCounterparty.Parameters.Incoming = 0 ; AreaDataContractor.Parametri.Vitrate = 0; Save PowerValue(DataAreaAccount.Parameters,SelectAccount); TabDoc.Vesti(AreaDataContractor,1); VibirkaAgreement to Counterparty = VibirkaContractor.Select(BypassRequestResult.Grouped); While VibirkaAgreement to Counterparty.Offset() Cycle AreaAgreementData.Parameters.Incoming = 0 ; AreaDataAgreement.Parameters.Witrate = 0; SaveAuthorityValues(AreaAgreementData.Parameters,SelectCounterpartyAgreement); TabDoc.News(RegionDaniAgreement,2); Incoming Bag = Incoming Bag + Select Contract to Counterparty.Incoming; Vitrat Pouch = Vitrat Pouch + Vibir Agreement to the Counterparty. Vitrata; End of the cycle; End of the cycle; TabDoc.FinishAutoGroupedRows();

Lost to enter personal data to the region Basement and display the area itself Spreadsheet Document.

AreaFootroom.Parameters.ResultIncoming = TotalIncoming; AreaBasement.Parameters.WitrateResult =WitrateResult; TabDoc.Vesti(AreaFooter);

In this case, the process of writing a new title for 1C 8 without vikoristannya SKD has been completed. Now you can formulate it in 1C:Enterprise 8 mode and add it to the adviser ExternalProblems You can download the file of the photo reviewed from the statistics at .

Watch the video of the creation of a new hand-made form for the ceramic program:

Introduce universal processing of objects 1C 8.3.

The basic version of the 1C platform 8.2 and 8.1 (on basic forms) had such a wonderful feature as “Universal selection and processing of objects.” Vaughn really experienced the life of programmers and program administrators.

The very same 1C sample appeared for the ceramic accessory (8.3 and 8.2). Until now, in 1C 8.3, it was possible to make do with the typical procedure of group change of details, but there is a constant need for problems that are faced in the daily work of a correspondent and a 1C program.

Search and select objects

Once the processing is complete, we can launch it as an external one. If you don't know, try going through the menu "File" - "Unlock". Apply at the registration form:

On the first tab, we can select the object we want to work with. So, in the field “Object by search” the document “Realization (acts, invoices)” is already selected. This is because they had already chosen this object before. The procedure can be remembered.

Behind the “Customize selection” button we can set the selection according to almost any field of the object:

If these selections are limited, you can select the required objects using additional input. To do this, move the “Selection mode” switch to the secondary position.

After all adjustments, the objects need to be selected. Click the “Find Objects” button and you will see the following selection result:

Processing of elements

Let's go to the "Processing" tab:

After a short look around, there are probably only the first three pieces. About the work of others, it is understood beyond the name, and they do not require adjustment.

Additional algorithm

The “Advanced Algorithm” module allows you to write an action program on internal 1C objects. The review includes the basics of programming and a description of the relevant statistics. With this help you can perform practical actions on objects:

Setting up details

The “Installing details” option allows you to change the details of selected documents or documents, as well as account registers. It is necessary to finish the rind, but sometimes it simply needs to be trimmed. For example, we can replace the document currency in selected documents:

It is important to remember that the process can be canceled immediately, but adjustments can be saved. This setting is displayed in the processing tree.

Renumbering of objects

The “Renumbering of objects” option, obviously, allows you to renumber documents or change the codes of advisers. Processing provides a rich set of actions. For example, you wanted to change the prefix for documents you selected:

Now we’ll wonder what we can earn with our savings. It appears that we can sign out in one batch by moving to the “Selected processing” window:

Now we can sequentially uncheck the selected settings by pressing the “Viscont” button.

For materials: programmist1s.ru