How to turn off the pop-up window with server calls in the 1C program. How to turn off the pop-up window with server calls in the 1C program How to disable pop-up notifications in 1s 8.3

During the lesson, we: created a database, created processing, created a form.

Now we will tell you 5 ways of messages from 1C "Hello world!"

Not everyone knows about at least two methods 🙂

How and where to write the text of the program?

Switch to the window tab with the "Module" form. You'll make sure you already have some text there ("Procedure...").

If there is no text, then:

  • In the thick client, you incorrectly added the form to processing, repeat from the beginning
  • In the thin client, you forgot to add a button, repeat from the beginning.

Inside the text there is a line:

// Insert handler content

Your task is to erase this line and enter the text of the program instead. After that, save the processing and open it in enterprise mode.

When you click Run, the actions you entered will now be performed.

And now let's move on to the methods themselves!

Message in 1C, method 1 - the easiest

So you should instead of the text "// Insert the contents of the handler." write the text of the program.

alert("Hello world!");

Actually, that's all 🙂

The message in the Enterprise mode in the thick client will be at the bottom in the 1C window, in the thin client - on the right in the processing window.

This is the simplest way and is very widely used by programmers.

Message in 1C, method 2 - also simple

alert("Hello world!");

Actually, that's all 🙂

The message in Enterprise mode in both client options will be in a pop-up window.

Message in 1C, method 3 - appeared only in 1C version 8.2

ShowUserAlert("Hello world!","Hello indeed!");

This method appeared only in 1C version 8.2. This is a pop-up window in the lower right corner of the screen that fades out over time.

Message in 1C, method 4 - programmer

Throw "Hello world!"Exception;

When executing any program, there can be an error. Sometimes this error can be calculated in advance (for example, you need to calculate a = b/c and at the time of program execution it became known that c is equal to 0).

In this case, there is a way to report the error in this way.

Message in 1C, method 5 - technological, only for a typical configuration

General Purpose.ReportError("Hello world!");

A 1C programmer must know not only those programming methods that are in the 1C platform, but also those that are in typical configurations.

Beginners, when trying to add any typical configuration, begin to reinvent the wheel.

Here's a great example. This feature is present in many typical configurations (only for the thick client!). It would seem that the result is equal to the action of method 1.
However, no - in some configurations (eg SCP) error messages are duplicated in the log. Also, with additional customization, the message looks completely different.

So, now you can feel like a real programmer!

This is what 1C programming is all about. Of course, real programming is much more complicated and requires a lot of knowledge, but now you have a general idea.

Good luck!

P.S. Screenshots are provided in the pdf version of the tutorial to make it easier to make your own experience.

P.P.S. 5 videos are given for the lesson with examples of creating a base for programming, creating processing, programming in a thick and thin client.

The article continues the series of articles "First steps in development on 1C".

In it, we will consider ways to inform the user that are present in the 1C:Enterprise 8 platform, and also focus your attention on some features of the operation of these mechanisms, these features are associated with the mode of using the modality.

Applicability

The article discusses the functionality:

  • Interface in version "Version 8.2" for the configuration developed on the platform "1C:Enterprise" 8.2.19.130
  • Taxi interface for a configuration developed on the 1C:Enterprise platform 8.3.4.496 to 8.3.9+
  • Taxi interface for a configuration developed on the 1C:Enterprise platform 8.3.10-8.3.11

How to display a message to the user in 1C

Displaying messages in user mode solves a number of problems:

  • reflection of the progress of the current process (showing the stage of the process; showing the calculated values ​​obtained during the operation of the algorithm);
  • issuing errors to the user for their possible correction;
  • issuing recommendations;

Message types:

  • terminators that stop the execution of the program and prevent it from continuing until the user reads this message and performs certain actions. For example, the user will be given a question on the screen, to which they will need to answer Yes or No. Until the user answers, the program does not perform further actions;
  • introductory messages, which are simply displayed to the user and allow them to work further (i.e. used in alert mode).

Termination messages should be error messages, and introductory messages: recommendations, messages about the current stage of the process and display of calculated values ​​(debug print).

Introductory messages are intended to give the user some information.

It is necessary that the user read it and, possibly, take some actions that are described in this message.

It is very important that the user actually read these messages, so they should only contain important information.

Test and debug messages should not be issued to the user, because sooner or later he will start to ignore absolutely all messages.

In the concept of a managed interface, the approach to issuing a message has changed somewhat. It is now tied to the form in which it originated. It can no longer be closed so that the text is completely invisible.

You cannot unpin a message box from a form.

Function syntax:

To report (<Текст сообщения>, <Статус>)

Those. the first parameter is the text itself.

The second parameter (message status) is optional. You can specify values ​​for the status: Normal, Important, Very important etc.

This value determines which icon will be placed next to the message. However, this only works in the normal interface.

In the concept of a managed interface, the icon is always an exclamation mark and cannot be overridden.

The fact is that if the message is generated at the time of writing a dictionary element, the following situation may occur.

User clicks on a button Write and close, in this case the message is displayed in the corresponding window (on the right of the form).

But the form is instantly closed, and the user will not see that some information was displayed for him.

Therefore, in the concept of a managed application, it is recommended to display informational messages using so-called notifications. An example of incorrect use of a function To report shown in the figure.

However, the function To report can be used to display information about some errors, for example, at the time of posting the document.

In this case, the system can be told that the form does not need to be closed, and show the user what errors occur when posting the document.

Function To report fully supported in Platform 8.3. It can be used, and it will work (both in the file version and in the client-server version).

But it should also be noted that the function To report there is a further development - this is a message class to the user, which allows, in addition to displaying a message, to bind it contextually to any form elements.

For example, an error message can be attached to a form element, which is very visible to the user. We will return to this issue a little later. Function To report there is an interesting feature.

Thus, the program code in Platform 8.3 can be executed both on the Client side and on the Server side.

In this case, the client program code is responsible for interaction with the user, i.e. forms are opened on the client side, reports are displayed.

Various dialog documents are also displayed only on the client. On the server, they cannot be executed because the server does not have the ability to interact with users.

But the function To report can be executed both on the Client side and on the Server side. However, using the method To report on the Server does not mean at all that the message will be displayed on the Server, there is simply nowhere to display them.

This means that if we display a message in the server procedure using this method, they will be accumulated in some buffer and they will be displayed on the screen only when the server procedure ends and the client returns.

At this point, the system will request data from the buffer and display it on the screen.

The same feature applies to the class MessageToUser. The figure shows an example of using the method To report on the Server side.

As a result of using the method To report on the Server side, messages were displayed on the screen on the Client side.

The notification mechanism is needed to inform the user that “something” has happened in the system and this “something” requires the user’s attention. Alerts are generated by two scenarios:

  1. By the platform itself when writing or modifying an object interactively
  2. Developer when calling in method code .

The notification itself is a small window that appears, as a rule, in the lower right corner and reports the action taken. Within a few seconds, it gradually goes out and disappears. At the same time, if you move the mouse cursor over the notification, it does not go out and you can read it carefully.

In addition, notifications can be accessed in the corresponding area of ​​the information panel (“History” button at the bottom left of the application form in the “Version 8.2” interface option).

To create your own alerts, you must use the global context method ShowUserAlert(). Its syntax prior to revision 8.3.10 is as follows:

Show User Alert (<Текст>, <НавигационнаяССылка>, <Пояснение>, <Картинка>)

The first parameter is the text that will be displayed in the alert.

Further, as the second parameter, you can pass some navigation link to any element of the infobase (the element that corresponds to the text of our message). When a user clicks on an alert, they will be taken to that link.

With the help of the third parameter, you can pass an explanation for the message, i.e. some extended description.

You can also assign a picture that displays the notification status.

Please note that all of these parameters are optional. Below is an example of using this method (in the configurator and in user mode in the "Version 8.2" interface option).

In version 8.3.10.216 of the platform for the interface in the "Taxi" version, the notification mechanism has been significantly improved in order to improve the usability of both thin and web clients. For this reason, the parameters passed to the method have also changed. ShowUserAlert(). Now the syntax looks like this:

ShowUserAlert(<Текст>, <ДействиеПриНажатии>, <Пояснение>, <Картинка>, <СтатусОповещенияПользователя>, <КлючУникальности>)

It can be seen that the second parameter, previously called Navigation Link, got a new name ActionOnPress. This is due to the fact that now it has become possible to pass to it not only a string with a navigation link, but also a description of the notification. This is illustrated in the screenshot below:

As you can see from the example, we now have the ability to programmatically handle clicking on the notification window, according to the logic that is needed.

Next parameter StatusAlertUser appeared for the first time. It indicates the status of the alert (Information or Important).

In the case of the Important option, if the user did not respond to the message, then after it is hidden from the screen, it can be read through the Notification Center (more on that below). In the case of the Information option, the notification is deleted without being stored in this center. Let's rewrite the code from our example as shown below:

After executing the command, we get approximately the following view of the application window:

A button with a bell icon appeared in the toolbar, which calls the above-mentioned Alert Center. It accumulates new important alerts to which the user has not yet responded.

If there are any alerts in the Center, then a small orange dot appears next to it to attract the user's attention. The user can open the Alert Center, read the text and, if necessary, perform some action.

The notification is removed from the Center by clicking on the clear button, however, if some action is associated with the notification, then as soon as the user clicks on the text of the message, it will also disappear.

And finally, the last parameter added was KeyUniqueness. You can use it to find the alert displayed on the screen and change it. If there is no notification with this parameter, a new notification will be shown.

As you can see, the possibilities provided by the corresponding method have become even greater! But these are not all changes in the notification mechanism.

As you probably already noticed, their appearance has changed. Alerts now look more modern and ergonomic, but they can't be moved around the screen or resized. Please note that in our example, the text of the notification simply did not fit entirely in the window itself, and the user can read it completely only by opening the Notification Center. Therefore, it is not necessary to write a large amount of text in the text of the notification.

Also new features include the simultaneous display of up to three alerts on the screen.

This concludes our acquaintance with the programmatic generation of alerts. However, remember that notifications are generated not only by the developer programmatically, but also by the platform itself at the time of interactive writing or changing an object. And often this fact causes misunderstanding, first of all, among novice users: why do we need these service alerts, which, by the way, cannot be turned off?

Let's imagine such a simple situation: the user has set a filter in some list for convenience. Let's say he did this in the form of a Nomenclature reference list. Then, after some time, I decided to introduce a new element called “Chair”, which does not match the previously set filter. He enters it, writes it down and ...? And does not see it in the list. What will the average user do? Of course, he will enter it a second time, but he will not see it again. A third, fourth, fifth time may follow. When he gets tired of entering the same thing, he will finally ask you: where does everything disappear to?

That is why the platform displays these service alerts, informing the user that his action has been completed. In our example, at the time of the interactive recording, the user will see the following notification:

Termination messages

Termination messages are those messages that will not allow you to work until the user performs certain actions, i.e. until it processes the message.

We will talk about the possibility of using termination messages in Platform 8.3 a little later (they are trying not to use them lately, so the example considered is more about Platform 8.2).

There are two methods for issuing termination messages Warning And Question. Warning differs from question because it has a single button OK.

A question can have different sets of answer options ( Not really, YesNoCancel, OK, OKCancel, Retry Cancel, AbortRetrySkip), which are set using the parameter.

Let's display some kind of warning using a string (for example, in a managed application module):

Alert("The base will be opened now");

To open a managed application module, select the object in the configuration tree Configuration, call the context menu and select the item Open Managed Application Module.

In this case, when the application starts, a window will be displayed that is modal. The modal window overlays all windows that exist in the application. Until we process this window, no further action is possible.

The function works in the same way. Question.

Syntax:
Question(<ТекстВопроса>,<Кнопки>,<Таймаут>,<КнопкаПоУмолчанию>,<Заголовок>,
<КнопкаТаймаута>);

Only the first two parameters are required. For the second parameter, the data type is composite ( Dialogue ModeQuestion or List of Values). The third parameter ( <Таймаут> ) characterizes the time interval in seconds during which the system will wait for the user's response.

When the interval expires, the question window will be closed. Similar parameter( <Таймаут> ) the function also has Warning.

As an example of using the function Question You can use the following code, written in a managed application module:

Please note that these methods Warning And Question) are not available on the Server. And this is logical, because interface methods cannot be executed on the Server, where there is no user.

Features of using modal windows in Platform 8.3

In platform 8.3, there are modes of operation with and without the use of modality. The default setting is Do not use modality mode.

In this case, termination messages cannot be used. If it is necessary to use termination messages (functions Warning And Question) you should change the value of the configuration property on Use.

The modal window is displayed at the very top and blocks work with other windows until the modal window is completed. In addition, the execution of the program code is stopped at the place where this window is called. Code execution will continue only after the modal window is closed.

First, the problems of using modal windows arise for a mobile application. Secondly, in the browser, window modality is implemented using separate pop-up windows.

Pop-up windows are often disabled in the default browser settings. The user has to be forced to set permissions on these windows.

Browsers for tablets and phones in most cases do not support pop-ups at all.

To replace functions Question And Warning new methods have been developed: ShowQuestion, ShowWarning.

These methods allow you to call the window, but not stop the execution of the program code. Technically, this is implemented by forming a pseudo-window inside the parent window. The pseudo-window does not overlap the parent window. After opening such a window, the code continues to be executed.

Receiving and processing the values ​​entered by the user is carried out in a separate procedure, which is called when the dialog box is closed.

Function Syntax ShowWarning:

ShowWarning(<ОписаниеОповещенияОЗавершении>, <ТекстПредупреждения>, <Таймаут>, <Заголовок>)

Parameter <ОписаниеОповещенияОЗавершении> (optional)

Data type: DescriptionAlerts.

Contains a description of the procedure that will be called after the warning window closes.

Function Syntax ShowQuestion:

ShowQuestion(<ОписаниеОповещенияОЗавершении>, <ТекстВопроса>, <Кнопки>, <Таймаут>, <КнопкаПоУмолчанию>, <Заголовок>, <КнопкаТаймаута>)

The first three parameters are required.

Below is an example of using the function.

Class MessageToUser

The main convenience of the message class MessageToUser is that this is a contextual message (unlike methods Warning And Question).

Messages can be tied to a specific screen element. This object is also available on the Server.

It should be noted that, firstly, this object must be created. For example: Message = New MessageToUser;

Thus, we create an instance of this object.

Secondly, you need to write the text of the message in a separate property.

Thirdly, in the property Field You can specify which form element the given message should be attached to.

Attention! To bind to the desired form field, pay attention to the initialization of properties PathToData And DataKey. For a document, when placing code in an object module, you can write:

Message.DataPath = “Object”;
Message.DataKey = ThisObject.Reference;

To open the document module, in the object (document) editing window, on the tab Other click on the button Object module.

For the experiment, let's place the code in the object module of any document.

Below is the result obtained in user mode for Platform 8.3.

It should be noted that the messages displayed using the new system object MessageToUser in general, they are not terminating. Those. the system will allow the user to continue further actions without responding to the displayed messages.

But, firstly, these messages are quite noticeable. Secondly, messages are usually displayed to the user at the time of writing the elements of directories or posting documents, i.e., when some checks are performed. And if errors were found, the user will see these same messages.

Accordingly, at the time of detection of errors, the transaction is canceled, i.e. it is forbidden to record an element of the directory, or it is forbidden to post a document.

Thus, a kind of emulation of the termination message takes place. Because the action is canceled until the user responds to the input message, it will not be possible to complete the action, such as swiping a document.

But, on the other hand, it is possible to close the document without holding it, without reacting to the message in any way. Therefore, these messages to the user are not terminating.

Process status notification

There is a special function with which you can display the approximate progress of a process.

Syntax: State(<ТекстСообщения>, <Прогресс>, <Пояснение>, <Картинка>)
Options:<ТекстСообщения>And<Пояснение>– optional, type – Line.
The text is displayed on a special status bar.
<Прогресс>parameter is also optional, but descriptive.
Type: Number. Progress bar value (from 1 to 100).
<Картинка>also an optional parameter.
When processing any event, periodic function calls of the type can be used:

In this case, the inscriptions may change, and the values ​​of the Progress parameter may change.

A function can be called both from one procedure (function) and from several. In this way, you can monitor the execution status of the process.

If you want to learn more about the notification mechanism, then take a break right now and read our new article Displaying the progress of lengthy operations in 8.3.10. It no longer explains at the beginner level all the subtleties and pitfalls of the operation of this mechanism.

We are completing our acquaintance with the ways of informing the user. We hope that you have an understanding in which situations one or another method should be used.

I would like to once again focus your attention on the fact that if your configuration (version 8.3.3+) involves working using a web client, then:

  • at the configuration level, the modality mode setting "Do not use" must be set
  • the code must use the methods of the asynchronous user interaction model. Such methods begin with the words Show or Begin.

More details about the refusal to use modal windows in the 1C: Enterprise 8.3 platform can be found in the final article of the cycle. And we move on and, finally, proceed to study the long-awaited Taxi interface, which has already been mentioned more than once in our materials.

Today we will deal with tooltips in 1C. They are very useful as they explain what to enter in a given field. You can create tooltips for any fields that are in 1C. They are often neglected by novice 1C programmers.

You and I will create tooltips for our Goods Arrival document. If you have not read the previous articles in which we created a new document, we calculated the total amount in the row of the tabular section. Also made a check for filling in the fields. I advise you to familiarize yourself with them.

How to make tooltips for form fields in 1C

And so let's start creating tooltips for various form fields in 1C. In the example, I will use the document we created earlier. But if you need to make hints for other documents, then everything is the same.

Let's remember what fields are in our document. These are Supplier, Name, Quantity, Price and Amount. Let's make tooltips for the Supplier field and, for example, Price. Open the configurator, go to the document and go to the Data tab in it. Double-click on the Supplier details. In the Properties window that opens, look for the Hint item. We enter there "Organization from which the goods were received."

In the same way, we make a hint for the Price field. Double-click on the properties of the price field and in the Hint item write "Price for 1 unit of goods."

Now we run our program in debug mode and look at the result. When you hover over the items with Supplier and Price, our tips should be displayed.

In new versions of 1C:Enterprise, users are notified about new versions of the 1C platform and configurations. These alerts appear as intermittent pop-ups. For ordinary users who are not involved in updates, pop-ups interfere with work and act as an irritant.

In this article, we will tell you how to disable intrusive reminders about the new version of the program using the example of the "Trade Management" version 11.3 configuration.

On the initial page of the program in the lower right corner, each user displays a list of news. Notifications about new versions of the program are part of the 1C news. To go to the news settings on the home page, you must click the "All news" hyperlink, it is highlighted in red in the figure below.

In the "News Display Settings" window, on the "News Feeds" tab, disable the "Updates of typical configurations" checkbox and click the "OK" button. You're done, you won't be bothered by the update pop-ups anymore!

In order to disable pop-up windows for all users, you need to go to the "NSI and administration" - "Internet user support" section.

In the "Manage news settings and updates" group, click the "Open news management settings" hyperlink.

In the news settings and update management window, on the "User Settings" tab, check the boxes for the users for whom you want to change the settings, then click the "User Settings" button. In the user settings on the "News Feeds" tab, disable the extra checkboxes and click "OK". After that, you need to click the "Save and close" button in the settings and update management window for news.

Disabling the pop-up window with server performance parameters in the accounting program of the latest edition

Now we will tell you about some technical points in 1C that every user should know about. Often, accountants using the 1C Enterprise 8 program say that when performing any operations, a small window pops up on the left side of the screen with data on indicators that the user does not need. Often such windows only perform an “irritating” function and do not allow them to work normally.
Usually the window has the following inscriptions - "Accumulated calls" and "Current calls" (with information about their number). In the managed appearance of "1C Enterprise 8" it looks like this:

In the appearance of "Taxi" it looks a little different:

Often users have a question, what are these windows with indicators, and how necessary are they in their work.

What is it?

This is one of the tools that was developed by specialists who worked on the 1C program. In other words, these are indicators of server call performance. Usually, in the "1C" mode, they show the developer in real time: organization, data on the duration and number of server calls, as well as the amount of received and transmitted information.

In short, the above tool was created in order to visually give the developer information about how many times the system accessed the server during the implementation of certain operations, as well as how much data was transported.

When installing the program, in the parameters inform. base automatically turns on the mode of reflection of these indicators. There is no doubt that these settings are not needed for an accountant and they only interfere with work.

Customizing the popup

Of course, the program provides for setting the number of indicators displayed in the window. To do this, right-click on the window (or click on the icon in the lower left corner of "Taxi") and select the item called "Settings" in the context menu.

After that, you will see an open form where you can select all the necessary indicators that will be displayed in this window, or simply uncheck the boxes for unnecessary indicators.

Ways to turn off the display of server calls

The first way is administrative.

To get started, go to . To do this, in the Enterprise startup mode, place the cursor on the required base and press the button called "Configurator".

By pressing the menu "Tools" - "Options" open the parameters inform. bases in the "Configurator" mode.

Then select the "Additional" tab, which is located in the parameters on the tab called "Launch 1C: Enterprise". Uncheck "Display performance options" and click on the "OK" button (or the "Apply" button).

And finally, in the "Enterprise" mode, launch the "1C" program.

The second way is custom.

In Enterprise mode, press the main menu button and select "Service" - "Settings".

After that, uncheck the box called "Display performance options", which is located in the settings window.

And at the end click on the "OK" button.