In the last video we were talking about these panels layout. How about the central area here? Can we, maybe, I don’t know, use it somehow? We sure can! The area is called the Home page, and it’s set up from here.
We can use the entire central space as a whole or split it into equal halves (this is what I usually do) or split it in two-to-one ratio.
Then we can select the forms we want to be shown there. Except there are no forms to choose from. The thing is that the Home page supports only explicit forms which brings me to our next subject: implicit and explicit forms in 1C:Enterprise.
Implicit and explicit forms
As we already discussed, every Metadata Object have all necessary implicit (A.K.A. standard) forms that it inherited from the Metadata Class. If we want to change them (or we need them on the Home Page), we have to create them explicitly. And this is how it’s done.
So, I’m adding a new form, and the Platform is asking which standard form I want to use as a template. I have a choice of the single document form, the documents list form and a few other options.
I want to start with the documents list form, and now the Platform’s asking what attributes I want to see there. I’m good with the Date and the Number fields, and I also want the PaymentMethod and the AdditionalInfo. Now we are in the forms editor and the default form with all its bells and whistles is here for us to play with.
But first, let’s also add a Purchases documents list form and place both these forms to the Home Page. And this is what it looks like right now. Not bad, right?
Commands and command interface
Now let’s talk a little bit about all these clickable links we can see here. These are called commands. Their purpose is to receive the user’s input and perform the specific actions.
But where did these commands come from? Let’s look, for example, at these two guys. If I open the Documents subsystem properties, there is the Command interface button, that shows all the commands from all the objects included into this subsystem. Here are the Purchase and the Sales commands. These commands were inherited from the Documents Metadata Class, just like the standard attributes, as we saw earlier. Each document has two standard commands: open the documents list and open a new document form.
Let’s tick these checkboxes and see what happens.
And now we have these two commands added to the drop-down menu here.
Now, who are these guys? These are called the command groups. Let’s try and drop this command to the Important group, for example, and it gets highlighted like this.
If we drop the command to the Tools group we’ll have a new drop-down menu with this command in it. So it’s all pretty straightforward, isn’t it.
So, these were the standard commands inherited from the Metadata Class. All the metadata objects have them, although the set of the commands can differ depending on the Class.
And of course, we can create our own command belonging to a specific metadata object, write a source code processing the command and then show it in the command interface.
And here is our command.
The last thing I want to show you is how to put command to the Quick Menu here. It’s meant to be filled up with the most often used commands, because it’s always gets open by default when the app starts.
It’s not a subsystem, so it gets set up from this menu right here. But besides that, it’s pretty much the same deal. I’m just selecting the commands I want and put them into groups I need them in. And here we go.