S
S
stictt2019-02-28 12:44:22
1C
stictt, 2019-02-28 12:44:22

1c How to call a form for some action on an object?

It’s not very long with 1C sign, the task is to make an arbitrary statement, with certain conditions, say, when you click on the nomenclature, it wasn’t the element module that opened, or what would open there, but an arbitrary form that we ourselves define. As someone familiar with other programming languages, I I thought, but if you pack the nomenclature into another nomenclature and override the default module, so to speak. but there are many problems, and questions, whose form will open if the field is specified by reference, and so on. That's about the crutches I wanted to go. Although the idea arose to create a synchronizer inside the nomenclature, when they create it, another object is also created. mirrored, but all these are small towns. I want to know if there is a better way?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry Kinash, 2019-02-28
@stictt

You have a jumble of terms. If you try to google your question, you will get bullshit.
"Directory" (you have the Nomenclature) is, roughly speaking, a plate in the DBMS without an explicit limit on the number, where each entry corresponds to an element of the directory.
"Vedomosti" (you have an Arbitrary Vedomosti) is a user-limited list of some data. It can be implemented by Report or Processing, if the result will be sent to the printer and does not need to be stored in the database. If you need to store in the database, then it becomes a document with a tabular part; classic - payroll.
"Element module"- this is generally the area of ​​\u200b\u200bdescription of event handlers or a program interface. The context of the mention says that you most likely meant "Element Form" (aka "Element Card").
"A certain condition" is an abstract concept, apparently related to the description of logical relationships. In the 1C world, these can be selection conditions (filters), registration conditions (old debts in red) or text notes with legal conditions for contracts.
You forget that solutions on the 1C platform are not classic OOP, but DSL (POI), and therefore you have a heap of crazy unviable ideas that I will not even comment on.
As I understand it, you need to see the nomenclature reference book, but according to some condition, when you click on an element, open not a card for this element, but a form of some kind of report, where you can pass a link to the clicked element as a parameter. There are a lot of implementation options and depend on the exact task. The simplest thing is to override the Choice event in the Nomenclature list (a list element on the list form) - check your condition there, upon fulfillment of which, disable the standard behavior and open the required form. If you need to be more universal and redefine from anywhere in the code, then in the form of an element in the creation or opening events (depending on the type of form), you can refuse the standard opening and call the desired form.

F
fsockopen, 2016-10-04
@fsockopen

where do you have this code? If on the local... is Apache installed or something like that?

D
DVamp1r3, 2016-10-04
@DVamp1r3

<?= "hello, world!" ?>
and generally check if the php web server is running (if the mod php/php-fpm is installed depending on, and if the launch of the interpreter for extensions is assigned) . And yes, it is not clear how you are trying to run the script (web or console).

P
PO6OT, 2016-10-04
@woonem

Where is the file? Is it named index.php?
I recommend creating .htaccess in a folder with a file with the following content:

<IfModule mod_fcgid.c>
  AddHandler fcgid-script .php
 </IfModule>
 <IfModule mod_php5.c>
  AddHandler application/x-httpd-php .php
 </IfModule>

And in /etc/apache/httpd.conf add:
AllowOverride All

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question