Additional reports and processing, use of extensions in 1C Fresh

    Today we want to tell you about the use of additional reports and processing, and especially configuration extensions in the service model. Technologies do not stand still, 1C database maintenance in the cloud is becoming an increasingly attractive service. What you need to know in order for the functionality necessary for your company to be implemented in a leased base, and how this process looks from the side of the service provider - this can be found out under the cut.
    image

    What are external reports and processing


    Processing 1C are different, but in any case, they expand the functionality of the configuration and allow you to quickly access information stored in the database, without changing the configuration and without removing from support. They can be built directly into the configuration, added as a configuration extension or be external files.

    According to the functionality of processing, they are divided into those that can change data and those that simply analyze information and display the result in a user-friendly form (reports). In order not to change the standard layouts of printing documents, external printing forms are developed. Also, external processing can be performed according to a specified schedule on the 1C application server - these are scheduled tasks.

    The Button has developed dozens of treatments that allow our accountants to use “practical magic”. For example, to analyze the correctness of accounting, the Button uses the external report “Auto-audit of databases”. Convenient tables are used to display analysis of 120 criteria for account balances and turnover, compliance of data from tax returns and accounting information, analysis of fixed assets and more.

    image

    image

    image

    An example of an external printed form “loan agreement” in the form developed by our lawyers. There are times when an entrepreneur takes an interest-free loan from his company as an individual, or vice versa, transfers his own funds to the company, then it is possible to immediately print the contract.

    image

    A form opens to fill out the necessary details:

    image

    And the printed form of the contract is displayed:



    Scheduled processing (scheduled tasks) we use, for example, to correct the statement. Buttons have integrations with the main banks configured and special robots download the statement directly to 1C. Thanks to machine learning technology, the percentage of errors during extracts was reduced to 3%. But as always there are exceptions, for example, clients who use an agent-based scheme for selling goods, in this case, the rules for conducting a bank statement are individual. In order not to reprogram the robot for a particular case, before the appearance of the configuration extensions, a routine was used to correct the statement after the robot every 10 minutes.

    What are configuration extensions


    An extension is a mini configuration that inherits objects from the main database configuration and contains code with additions or corrections of objects and modules. In this case, the main configuration remains on the support, it is not necessary to include the ability to edit, which greatly facilitates the update process.

    The mechanism involves three types of use, which, in fact, are indicated in the “Purpose” field when creating the extension:

    1. Correction is an extension to correct minor inaccuracies and errors in configuration objects;
    2. Adaptation - the default value when creating a new extension. We use to change typical objects to our requirements;
    3. Addition - adds a completely new functionality to the standard solution.

    Administration of additional reports, processings and extensions


    Today, Button provides accounting outsourcing services to more than 1000 entrepreneurs. We have implemented and have been using 1C Fresh for more than two years now - the technology for publishing application solutions on the 1C: Enterprise platform, which is used in the 1cfresh.com cloud service. This is the best solution for servicing such a large number of 1C bases today. One infobase with the help of dividers is divided into independent areas, more details can be found in our article " How to independently maintain 2500 accounting databases ."

    A central component of the technology is the Service Manager., it stores all the information about subscribers, users, applications, information databases and the relationships between them, with its help, and controls external processing and configuration extensions.



    All files with processing are uploaded to a special directory of the service manager. But before you upload the file to the directory, in other words, “publish to the service“, it must be specially prepared.

    Preparation of external reports and processings for publication in the service model


    An additional report or processing is created in the “1C: Enterprise 8“ configurator as standard external reports and processing and saved to a file with the extension - .epf (for additional processing) or .erf (for additional reporting).

    The object module must have procedures and functions for determining registration parameters.





    Please note that the “Version“ is an important parameter. If you have made changes to the processing that was previously uploaded to the service manager directory, be sure to change the version number, otherwise the service manager will refuse to download this file. When developing a report or processing, it should be borne in mind that users work in a service model through a web client (a good blog article1C). If the processing contains forms, then they must work in the web client under all web browsers that are supported by the 1C: Enterprise 8 technology platform.

    According to the standards of the 1cfresh.com service , an additional report or processing should be fully operational when executed in safe mode, that is, work without resorting to objects external to the configuration.

    An additional report or processing should be prepared for download to the service as a delivery kit. The delivery package is an archive (zip file) containing:

    • additional report or processing file;
    • xml-file of the manifest, which contains additional meta-information necessary for the service manager to publish an additional report or processing in the service.

    Preparation is carried out in a locally deployed information base of the configuration for which an additional report or processing is intended. We use a special assistant to create a delivery kit, external processing Preparation of Additional Reports and Processing to Publications in the Service Model.epf. You can read more in the documentation on the Technology of publishing solutions 1C Fresh.



    Installation of additional reports and processings in the service model


    A distinctive feature of 1C Fresh technology is that an external report or processing cannot be loaded directly into the data area. Adding occurs only by the service administrator through the service manager. After the zip archive with the processing file has been prepared, it must be downloaded to the service manager directory and installed for a particular subscriber of the service.

    A service subscriber is a group of users united by some principle. Accordingly, the information databases available for a specific group of users are called subscriber applications.

    Applications can have various 1C configurations (Enterprise accounting, Salary and personnel management, Management of our company, etc.), for which it is possible to use the service model. An additional report or processing can be installed only in the subscriber’s applications, which is indicated when downloading the file.

    This is how the properties form of the additional report with versions looks. Using the “Add / Remove” hyperlink, we get to the list of applications and select the necessary databases.



    After the processing is downloaded and the application is selected, the service manager contacts the application address and gives the command to install it in the infobase.

    We start scheduled processing


    When working with a large number of accounting databases, some processing must be performed periodically. For example, once a month or once every few minutes. It is also important to automate manual and typical user operations. For this, we actively use scheduled tasks.

    Scheduled processings do not have a form. All logic is registered in the module of the object and looks as follows.




    When preparing the delivery kit, we set the schedule. Now our processing will be performed every hour.



    More on configuration extensions


    In parallel with external reports and processes that need to be prepared and administered “in the old fashion”, we began to actively use the configuration extension mechanism. Starting from the 1C Enterprise 8.3.10 platform, this mechanism has made our life easier and made it easier to adapt configurations to the Button features.

    For example, we wrote above about routine operations to correct documents for robots that run every 10 minutes. Now you can use the extension to override the operation of the modules. Thus, we can immediately, when recording or holding a document, perform the necessary actions. This is much more optimal, because the queue of tasks in the database is not clogged with the execution of actions every 10 minutes, and more quickly, since changes are made immediately.

    Preparing a new extension is easy enough. Let's look at the process of creating extensions with specific examples.
    According to work experience, the leader in terms of requests for corrections is the TORG-12 printing form. For example, we need to make an extension for the ability to print a waybill in currency (by default, it can only be formed in rubles).
    Open Menu → Configuration → Configuration Extensions.
    Create a new extension with the purpose of “Adaptation”.



    The extension looks like a familiar configuration tree, but so far without objects. First of all, we add a new TORG-12 layout, into which we inserted columns with amounts in currency.



    Since the waybill is printed from the document “Sales of goods of services”, we add this document to our extension from the main configuration and make the necessary changes to the manager module. To do this, select "add to extension" in the context menu of the implementation.



    Now you can finalize the implementation manager module. We need to add a new form to the list of printed forms and fill in the amounts in currency.



    To change typical procedures, we use the & After annotation, we also need a couple of our functions and a procedure.

    Let's dwell on the annotations. In extensions, you can use: & Before, & After, & Instead (very neat). The principle of operation is simple: we want our algorithms from the extension to be executed first, put the annotation & Before and in parentheses indicate the name of the procedure from a typical configuration. If you first work out a typical module, and then ours, use & After.

    Annotations & Before and & After cannot be applied to functions. Therefore, if we need to change the function algorithm from the main configuration, we use the annotation & Instead.

    Annotation & Instead should be used as rarely as possible, since it completely replaces the execution of the procedure and function from the main configuration with the procedure / extension function. With this method of interception, the procedure / function from the main configuration will generally cease to be executed while the extension is installed, even updating the versions will not help.

    Conclusion


    There are many different opinions about the use of extensions and external reports / treatments. Based on our experience, we are with two hands “for” expansion. This is a modern and more adaptive technology, it has much more features, and their publication is many times easier. Only the necessary part of the code is placed in the extension, and there is also no need to additionally prescribe procedures and functions for determining registration parameters, monitor versions and create a delivery kit.

    You can use multiple extensions for the same data area.
    For the specifics of working 1C Fresh in the mode of data separation (one configuration, many independent areas), the extension method is an excellent output.

    Also popular now: