1C Tutorial
1C Tutorial
Contents
Introduction .................................................................................................. 4
If you have everything you need? .................................................................... 5
Infobase ....................................................................................................... 6
Start "programming".....................................................................................12
Subsystems...............................................................................................14
Catalogs ...................................................................................................16
Register ....................................................................................................41
Documents ................................................................................................45
Reports .....................................................................................................58
Improving the interface .................................................................................76
Improving subsystems ................................................................................76
Adjusting the subsystem content .................................................................80
Start page .................................................................................................85
Command interface of Main section ..............................................................91
Managed forms ..........................................................................................94
Standard and ordinary attributes .................................................................97
Object presentations ................................................................................ 101
Quick selection of values ........................................................................... 102
Adjusting reports ..................................................................................... 104
Report variants ........................................................................................ 109
Functional options ...................................................................................... 118
Cross-platform design ................................................................................. 125
Linux ...................................................................................................... 125
Web client ............................................................................................... 126
Mobile platform ........................................................................................ 131
Where and how to study 1C:Enterprise ......................................................... 149
1C:Enterprise 8 (training version) .............................................................. 149
1C:AccountingSuite demo ......................................................................... 150
Business automation ................................................................................... 151
1C:Enterprise 8 ....................................................................................... 151
1C partners ............................................................................................. 152
Useful online resources ............................................................................... 153
About 1C Company ..................................................................................... 154
2
Hello, 1C
3
Rapid application development tutorial
Introduction
The main business of 1C Company (see page 154) is development of
business management and accounting software, as well as educational
applications development and publishing, and software distribution. Over
1,000,000 companies and over 4,000,000 employees are using business
software powered by 1C:Enterprise (see page 151). Market requirements
for developers and qualified users capable operating 1C:Enterprise grows up
constantly.
The main goal of this tutorial is to demonstrate the basic features of the
1C:Enterprise 8 platform and its software engineering technology. There will
be no secrets except for one: within a few minutes, using almost only a
mouse, you can create a fully functional application to keep personal finance
records that is compatible with different DBMS (database management
systems), Windows, Linux, web browsers, and even iOS and Android mobile
devises.
Perhaps you are already familiar with one of high-level programming
language, for example Java, C++, or Delphi. Many books and programming
training courses start with a simple task such as creating a program that
would display a simple text on a screen, for example, "Hello, world!"
In fact, what you are going to do in this tutorial is "Hello, world!" powered
by 1C:Enterprise. Indeed, the functionality of the demo application is going
to be much broader than the simple output of a phrase on a screen.
However, considering all capabilities of the 1C:Enterprise 8 platform, what
you are going to develop is precisely "Hello, world!" in the world of
1C:Enterprise.
4
Hello, 1C
The installation procedure is simple. Agree with all default options, and
continue clicking Next until the installation is complete.
5
Rapid application development tutorial
Infobase
1C:Enterprise is not a universal IDE. You cannot create any type of program
using 1C:Enterprise. It is designed for automation of business and
individuals. For this reason, many concepts are already embedded into the
heart of 1C:Enterprise, its technological platform.
Anywhere where there is 1C:Enterprise, there will be a technological
platform. This provides uniformity so that the development and modification
technology, as well as structure of 1C:Enterprise applications are always the
same.
The major technological concept used in 1C:Enterprise is Infobase.
Roughly, each infobase is a single 1C:Enterprise application. The unique
characteristic is that each infobase contains not only the data the user
works with, but also the program, which is named applied solution, that is
executed by the platform. For example: 1C:AccountingSuite or 1C:Small
Business both are applied solutions.
Thus, when you need 1C:AccountingSuite application, create an infobase
with 1C:AccountingSuite applied solution and keep your finances accounting
data in this infobase. You can create multiple infobases for keeping
information for different companies with the same 1C:AccountingSuite
applied solution, but different data. If you will need 1C:Small Business, you
will have to create an infobase with another applied solution, 1C:Small
Business. In that infobase you will keep goods production accounting data
rather than finances accounting in 1C:AccountingSuite infobases.
Thus, if you have an infobase, you have everything you need for work: data
and an applied that knows how to manage it.
The creation of any 1C:Enterprise applied solution starts with the creation of
an infobase, where that applied solution and data, managed by it, will be
stored.
Getting started. Start 1C:Enterprise: click Start, and then point to All
Programs. Point to 1C Enterprise 8 (training version), and then click
1C Enterprise (training version).
6
Hello, 1C
Notice: If you already have infobases in the list, there will be no suggestion
to add a first infobase. In this case click Add... to add an infobase.
Now the wizard will ask what you would like to add to the list of infobases:
a completely new infobase, which does not exist yet, or an existing
infobase, for example, the one that already present on a local network
server.
The default option is to create a new infobase, and this is what currently
required. Thus click Next.
7
Rapid application development tutorial
There are two ways to create a new infobase: an empty infobase that will
contain neither data nor applied solution, or use a template that can contain
an applied solution and maybe even demo data. To create an infobase with
preset application you can use first option on the next page of the infobase
creation wizard.
Since you have not installed any template yet, the wizard will set an option
to create a new empty infobase as default and you can continue by clicking
Next.
8
Hello, 1C
The wizard will now ask for a name that you would like to give to the new
infobase. The infobase name does not affect anything so any name can be
used, but for referring matter name it Hello, 1C. This name will be
displayed in the infobase list at startup. Click Next.
Finally, the wizard will ask you for a folder where the infobase will be
stored. Default value is the user profile. Enter C:\hello_1c in the Infobase
directory field. If you have insufficient space on your system drive, you
can specify a different location by clicking Select . However, in most cases
you can accept the default value and click Next.
9
Rapid application development tutorial
On the next page you need not to change anything, click Ready.
As a result you will see the new infobase named Hello, 1C in the list of
infobases. Click Designer to start developing the Hello, 1C application.
Designer mode is the developer mode of running 1C:Enterprise platform
that is used to create or modify applications that already exist in infobases.
1C:Enterprise mode is a user mode for working with the data stored in
infobases.
10
Hello, 1C
11
Rapid application development tutorial
Start "programming"
It is no accident that word "programming" is used within quotation marks in
the title. Programming itself in its common use, writing code, is an essential
part of 1C:Enterprise, but not the number one.
Since 1C:Enterprise, as it was said in Introduction chapter on page 4, is a
problem-oriented platform, it hides from the developer many boring routine
actions. All 1C:Enterprise applications are built using the same design
methods, each application is put together from ready-to-use building
blocks. The number of building blocks is limited, the platform has
implemented functions of all of them and how they interact between each
other.
Therefore, a developer simply needs to add necessary building blocks to the
infobase and it will work right away. The platform itself will ensure the
proper functioning of building blocks.
Of course, the number of default functions is quite limited. In practice,
everything is much more interesting and full of surprises. For this, there is a
built-in script language, named 1C:Enterprise script, and a built-in query
language, named 1C:Enterprise query language. With them, you can
adjust the behavior of building blocks, define algorithms of interaction
between building blocks, implement your own data processing algorithms,
etc.
As it was said in Introduction chapter on page 4, this tutorial is about
writing "Hello, world!" using 1C:Enterprise. Therefore, you are going to use
less of script and use close to no query language. The use of script and
query language in 1C:Enterprise is a complicated subject that requires a
separate book.
The current task is to create a simple application from building blocks. In
other words, to demonstrate basics of the development process. Adding
bells and whistles, improvement, and modification can be done later, if you
are interested and have time to do it. However, it is still important that
even in such a skeleton form, the application will be fully functional with
minimum efforts.
Notice: To make sure, you can create an application with similar functions
using any other universal IDE, and compare the necessary knowledge and
time that you spent.
Now, get back to building blocks. Since purposes of 1C:Enterprise
applications are predefined, building blocks are not abstract, but problem-
oriented and related to practical entities. For example there are building
blocks of catalogs and documents classes, which business and individuals
use in daily work.
In 1C:Enterprise, these building blocks are called configuration objects. All
configuration objects are grouped into a tree. Thus, by looking at the
Configuration object tree, you can observe the architecture of any
application. You can quickly locate the object and learn its properties.
Now the configuration is opened after you clicked Designer in the end of
previous chapter. To see the Configuration object tree, you need to click
Open configuration .
12
Hello, 1C
For now this tree is empty, it contains only top-level nodes, which can be
found in any 1C:Enterprise infobase.
The things that you will do next are adding configuration objects that are
the basis of the Hello, 1C application. Along the way you do it, there will be
some "bells and whistles" added, but without of going into much detail.
What configuration objects shall you add? It depends on the purpose of the
automation, which is reflected in project requirements.
In this tutorial, according to the project requirements you will create a
simple personal CRM (Customer Relationship Management) application. On
the one hand, this application will store information about all your friends
and acquaintances, in other words, maintain a contacts database. On the
other hand, it will track different kinds of events, both past and future. At
the same time, it will be able to track financial activities: receipts and
expenditures related to both your friends and events in your live. In
13
Rapid application development tutorial
addition, there will be added some features to make use of the application
simple and easy.
That is it, nothing too complicated.
Subsystems
That is why you will create three subsystems: Contacts, Events, and
Finances.
There is a common way to add configuration objects. Right click the branch
of the configuration tree where the necessary objects will be located, and
from the context menu choose Add (Ins) command.
The Subsystems branch is located in the Common group of
the Configuration tree. Add a subsystem.
14
Hello, 1C
On the right side a new configuration object editor will open. This window
contains properties of the new subsystem. Name the first subsystem
Contacts. 1C:Enterprise will automatically add a value to Synonym
property once you press the Enter or the Tab keys being positioned in the
Name property. For now, there is no need to change anything else in this
window, so click Close.
In the same way, create other two subsystems: Events and Finances. As a
result, you will have the following tree:
Figure 3-3. The Configuration object tree with newly added subsystems
You added service building blocks. Next, you will add business building
blocks.
15
Rapid application development tutorial
Give a name to the applied solution. right now, it has a generic name
Configuration. In addition, at the same time, learn one more way to edit
object properties, which is the Properties window. To open this window,
double-click the top row of the Configuration object tree or right-click on
the top, and then click Properties (Alt+Enter).
Now, in the same way as you did for subsystems, type in the Name
property the name of applied solution: Hello1C. Then edit the automatically
generated value of the Synonym property to Hello, 1C.
You can verify on your own that there is a shortcut to nearly any property
of configuration object in the Properties window. In this tutorial, you will
use Properties on numerous occasions.
Catalogs
16
Hello, 1C
When you add a catalog, a new configuration object editor is opened. You
already saw this window when created subsystems. Catalog is a complex
object to configure, therefore, this editor is intended to ease and speed up
the configuration procedure.
Although the same catalog properties can be specified in Properties on the
right, it is more convenient to use this dialog window. Following all the tabs
of this editor ensures that all the necessary properties are filled in and
nothing is missed.
17
Rapid application development tutorial
There is nothing else to add on the Main tab, so click the Subsystems
tab. On this tab, specify that this catalog belongs to the Contacts
subsystem.
18
Hello, 1C
The platform will prompt you to update the database configuration, confirm
this process.
19
Rapid application development tutorial
The platform then will analyze the changes that had been made in
configuration objects and inform you that a new object is added, named
Catalog.ContactTypes.
The catalog that you have just created is included in the Contacts
subsystem. Thus, click Contacts, and see the Contact types link on the
screen.
After clicking this link, you will see a list of contact types, which is currently
empty.
To reduce the amount of manual data entry, this tutorial includes
an import utility and the sample data needed to populate the catalog. This
20
Hello, 1C
utility is the data processor that will fill in the Contact types catalog data
without entering the data manually.
The name of the data processor file is ImportXMLData83.epf. You can
find it in the current distribution, for this, run setup.exe, click Custom
setup and then click Hello, 1C additional files. In opened folder, you can
find the data processor. Copy it and all other files in that folder to your
computer.
To run this data processor, click Main menu that is at the top left corner
of the main application window.
21
Rapid application development tutorial
In Main menu click File and then click Open… (Ctrl+O). In the opened
dialog select ImportXMLData83.epf, and click Open.
The data processor will let you to import the data from XML files.
22
Hello, 1C
In the opened data processor, click Select , and then find and select
the 01-ContactTypes.xml file.
23
Rapid application development tutorial
After selecting the file, click Import. Shortly, the data processor will notify
you that the data is imported.
24
Hello, 1C
Close the data processor and open the list form of the Contact types
catalog. If this form is already opened, press the F5 key to update it.
25
Rapid application development tutorial
26
Hello, 1C
Start the application in the 1C:Enterprise mode again and import the
prepared People relation types data from 02-PeopleRelationTypes.xml.
Because of changes that had been made previously, the People relation
types catalog will be displayed as follows:
27
Rapid application development tutorial
Now, create a primary catalog, named People, where all people that a user
knows will be stored. Same as previously created catalogs, include this
catalog to Contacts subsystem. Then, click the Data tab, set length of the
Description attribute to 150 characters. This attribute will be used to keep
names of people.
Up to this point, it was nothing special, you have just created another
catalog that will keep the list of names of friends and acquaintances and
store those names in the Description attribute. However, there is very
little benefit comparing to simply storing a list of names in a spreadsheet
document. That is why you will use more features of 1C:Enterprise 8 and
add more attributes to store additional information about people.
To store additional information, you can add any number of catalog
attributes. In this tutorial, start with the following attributes: Gender,
RelationType, and Comment.
28
Hello, 1C
To add Gender as a new attribute, click the Data tab, then click Add
(Ins) for the People catalog.
In Properties, enter Name, and Synonym once again will be generated
automatically. There is one more thing to do. You need to specify the way
to store data in the Gender attribute. As you can see in Properties, the
default type for an attribute is String.
You can leave everything as it is, but in that case, every time when adding
a new person to the catalog, the user will have to enter gender manually in
the Gender attribute. First, typing information manually for a large number
of records is a very time consuming job. Second, there is a high risk of
human error such as typo, wrong information input, and inconsistent values
as there are many variations of writing genders. These errors, regardless of
their nature, will make complicated any future automatic analysis of this
data.
The first thing that may come to mind is to create the another catalog
where specify both genders, and then use those catalog items. It is a
reasonable idea, but creating a new catalog for just two objects is a
redundant task. Which way is better then? There is another, new for
you configuration object.
Enumeration is an object that is created and filled with data at the
development of an applied solution stage. An enumeration can store a
limited, known beforehand, and same type of data. Gender is precisely the
type of data that is good to be stored as an enumeration, rather than as a
catalog.
To create a new enumeration, leave People catalog as is for now and find
Enumerations section in the configuration tree, then repeat the already
familiar process of adding a new configuration object.
29
Rapid application development tutorial
Click the Data tab, and then add two values using Add (Ins), those
values are Male and Female.
After the values are added, close the enumeration editor by clicking Close.
You will see the previously opened People catalog editor. Now you can
change the type of the Gender attribute from String to the newly created
Genders enumeration. To do that, select the Gender attribute and in
the Properties window in the Type property click Select button. If you
accidently closed the Properties window, you can always open it by right-
clicking on the configuration object and selecting Properties or by double-
clicking the attribute.
30
Hello, 1C
In the opened window, find and select the Genders enumeration, then click
OK.
Figure 4-23. Selecting the Genders enumeration as the type of the attribute
The accuracy of the selection for the type can always be verified in
the Properties window.
31
Rapid application development tutorial
After making sure that everything is done correctly, return to the People
catalog editor, and continue adding new attributes. Next attribute to be
added is RelationType. Similar to Gender, add RelationType as an
attribute and then select PeopleRelationTypes as its type, which is
placed in the CatalogRef group in Edit data type window.
The last attribute to be added is Comment, which will keep notes and
thoughts about a person. When adding this attribute, accept the default
data type, String. However, the length value needs to be changed. To
avoid any guessing while determining the appropriate length of comments,
simply set the length of the Comment attribute string to Open-ended. For
this select Open-ended check box in Properties.
32
Hello, 1C
Keeping in mind the task requirements, you should create another set of
attributes where contact information of people will be stored. You might
conclude that since you have created Contact types catalog, then should
add the Contact type attribute of the CatalogRef.ContactTypes type,
that will keep the information about the type of the contact. Then add at
least one more attribute that will store the value of that contact, and
name it Contact value. In other words, to store a person's address, you
will have to select the Address as the type of the contact, and then input
the actual address in Contact value attribute.
At this point, consider one more thing. Once you will need to keep more
than one contact, if you will store them in the same way as described
above, you will have to add as many pairs of Contact type/Contact value
attributes as you need to keep a required variety of contacts. But it breaks
down the efficiency of the storage since every person will have own pairs of
data. Furthermore, every time a new type of contact appears, you will be
required to add a new pair of attributes. This procedure have to be
repeated each time a new piece of information occur.
Fortunately, there is no need to do that. It is clear that every person has an
own set of contact information. 1C:Enterprise 8 solves this problem by
allowing you to create tables for each catalog item.
Add the Contacts tabular section for People catalog. Click Add tabular
section , and then name the table Contacts.
33
Rapid application development tutorial
Return to the People catalog editor, click on the Contacts tabular section,
and add a new attribute to that tabular section by clicking Add attribute
. Name a new attribute Type and select the ContactTypes, which
is located in the CatalogRef group as its type.
In the same manner, add the Value attribute, which is going to be a String
with length of 1,024 characters.
34
Hello, 1C
At this point the People catalog is considered finished. Take a look what
you have now. To start the application in the 1C:Enterprise mode click
Start Debugging (F5).
Confirm the system request to update the configuration, and then accept
the changes to the configuration.
Now go to the Contacts section that you have seen already, and look at
what you have created.
Now the list contains people. To verify, which data is contained in individual
records, double-click any record.
36
Hello, 1C
As you can see, main attributes, related to a person, are located on the
upper part of the window, and the contact information is conveniently
arranged in the tabular section on the bottom.
Note that in addition to generation of forms to display lists of catalog items,
the platform also automatically generated a form of catalog items.
Close the main application window and return to the Designer mode to add
two more catalogs, which are Event categories and Events.
The Event categories catalog is created in the same way as the People
relation types catalog. The Description attribute length will be 150
characters as well. The only difference is the association with
the subsystem. Event categories will be included to the Events
subsystem.
In the 1C:Enterprise mode, import the data for this catalog from the 04-
EventCategories.xml file.
37
Rapid application development tutorial
The last thing you need to do in this chapter is to add the only remaining
catalog, named Events.
The Events catalog will also be included to Events subsystem. Set the
length of the Description attribute to 150 characters. Then, add following
attributes to this catalog:
Begin date with Type equals to Date and Date Content – Date
and time.
End date with Type equals to Date and Date Content – Date and
time.
Category with Type equals to CatalogRef.EventCategories.
Details with Type equals to String and checked Open-ended box.
38
Hello, 1C
39
Rapid application development tutorial
Now you have created everything that is required to keep track of events in
life of users.
40
Hello, 1C
Excellent! The People catalog can store the information about all of user's
relatives, friends, and acquaintances, including a variety of contact
information of these people. The Events catalog stores the information
about past and planned events, also participants can be specified here. At
the same time, three auxiliary catalogs, ContactTypes,
PeopleRelationTypes, and EventCategories help users to customize
data, related to primary catalogs.
Moving further.
Register
Now add a building block that may not be obvious from the first sight. It will
be the Financial transactions accumulation register.
Questions, "What is a register? What is its purpose?" immediately arise.
Below you will find a simple explanation.
According to project requirements, the application should not only be
capable of storing a list of friends and tracking events. It also should be
capable of keeping records of financial transactions. At a minimum, it
should keep records of cash flow and provide simple financial reports.
Registration of various events related to money income and outcome will
be implemented by using configuration objects, named Documents. Later,
you will add a couple of documents to the applied solution.
Together with registering money incomes and outcomes, it is required
to create some reports, demonstratively displaying what happens
to finances. These reports can be created using data that is contained in
user input documents. These documents reflect actual receipts and
expenditures of money. However, imagine that in a month (or a year), for
example, you decide to supplement your financial records with new
documents or functionally expand existing ones.
Making configuration changes, as you have already seen, is a simple task.
However, what will happen with reports in this case? It might turn out that
financial reports that you created previously will not work properly, because
they use only income and outgoing records from the old documents as data
source. This means that you might have to rebuild all related to this
data reports. Live applied solutions usually contain a large number of
reports.
To avoid this work, and a large number of errors that may become a result
of this alteration, 1C:Enterprise uses the following development
methodology:
To store data regarding activity of accounting subjects, finances for
example, configuration objects named Registers are used. Documents
that reflect business activities, record data in these registers. Reports, then,
use these registers as data sources.
As a result, you have a separated structure. On one hand, once there is a
complete set of registers, it is easy to create required reports that
will demonstratively display information contained in these registers. On the
other hand, when a new type of document appears in the applied solution,
you only need to add the correct algorithm to place data in registers. This
41
Rapid application development tutorial
methodology guarantees that previously created reports will not require any
alterations and will display correct data.
42
Hello, 1C
Resources are the data that you are going to obtain from the
register. For Financial transactions you need to know the amount of
transactions. Hence, only one resource of Number type named Amount is
required.
Dimensions refer to slices of information that is required to be obtained
from the register. It is unlikely that you will be interested only in the overall
balance. For example, to create a finance flowchart you may be interested
in which events or people bring you most of the money, or which consume
the most. To track this, you will need to have two dimensions Event and
Person.
Attributes keep additional information that accompanies each record in the
register. For Financial transactions you will not use attributes. However,
nothing prevents you from adding them to the register in future and
then keeping any auxiliary information there.
Add mentioned above dimension and resources. To add them, right-click
the Dimensions and the Resources groups of the accumulation register,
and in the context menu click Add (Ins).
Now, add a dimension.
43
Rapid application development tutorial
Now add the Amount resource. Accept default values of Type and Length,
and adjust only Precision, increase it from 0 to 2.
44
Hello, 1C
Documents
Each document, by default, has two attributes, Number and Date that
indicate the sequential number of this document and the date when it was
45
Rapid application development tutorial
In order to be able to track events and people, you need to create two
attributes in the newly created tabular section, Event and Person. To track
the amount of transactions, create the Amount attribute.
Because of these actions, Data tab of the document will look as follows:
46
Hello, 1C
47
Rapid application development tutorial
The Register Records Wizard window will open. Leave Register record
type unchanged, equal to Receipt, since this document is a receipt of
money. Then select Receipts in the Tabular Section field and click Fill
Expressions.
48
Hello, 1C
In the table at the bottom of the window, see that the platform
automatically found the correspondence between accumulation register
attributes and document attributes. The value of the Event tabular section
attribute of the document will be placed in Event register dimension. The
value of Person tabular section attribute of the document will be placed in
the Person register dimension. The value of the Amount tabular section
attribute will be placed in the Amount register resource.
After filling out and verifying the correspondence table, click OK.
The wizard will generate the procedure for writing document register
records, in other words, for posting the document, and then display it on
the screen.
49
Rapid application development tutorial
As you can see, the procedure is quite simple. For each row of the tabular
section in the document, the new record is created in the register, and this
record contains the data from the row.
You could write this algorithm yourself, but to minimize the amount of work
it is better to utilize Register Records Wizard. The wizard generated this
code automatically, which is mentioned in comments at the begin and the
end of the procedure.
Now start the application in the 1C:Enterprise mode by clicking Start
Debugging (F5), and using the ImportXMLData83.epf data processor
import demo data into the Cash receipt document from the 06-
CashReceipt.xml file.
Click the Finances tab and open the list of Cash receipt documents.
For now, documents are just imported, and they do not affect reports yet.
In order for the data to be displayed in reports, documents have to be
posted. When documents are posted, the data is being added to
the Financial transactions accumulation register.
Open the first document. To post the document, click Post and close.
50
Hello, 1C
The fact that the document posting was successful is displayed as a check
mark on the icon of this document in the list of documents.
To verify the way the document was posted, meaning the required
information is recorded in the Financial transactions accumulation
register, open Main menu of the application, click All functions..., then
expand accumulation registers node, then click Financial transactions,
and then click Open.
Notice: The All functions... menu item is available by default if an
application is started in the debug mode from the Designer mode.
51
Rapid application development tutorial
Notice the icon, which means that the values of resources of this record
are added to total values of resources.
Switch to Cash receipt document list and post the second document. After
the posting, return to the list of records of Financial transactions register.
See that a new entry, belonging to the second document, appeared. You
can update the form with F5 key.
52
Hello, 1C
Finished with Cash receipts. However, users also need to track outgoings.
Go back to the Designer mode. It seems obvious, that it is necessary to
create the Cash payment document. You could easily create it manually in
the same way as you did already with the existing Cash receipt document
because compositions of two documents are identical. Another option,
however, is to use the 1C:Enterprise 8 feature allowing you to create new
configuration objects based on existing ones by simply copying them.
To do this, right-click the existing Cash receipt document in the list of
metadata objects and click Add by cloning (F9).
53
Rapid application development tutorial
The only thing left to do is to rename the document and edit some of its
properties. Do it.
First, open this document in the document editor editor and change the
name of the document to CashPayment. Moreover, include the new
document to the Finances subsystem.
On the Data tab, using Properties, change the name of the tabular section
to Expenses. Keep the remaining attributes unchanged as they meet
project requirements.
Click the Posting tab. Here you will change the document posting. For now
the posting algorithm is copied from the Cash receipt document. That
document keeps income but in the newly created document is designed to
keep outgoings.
Open Register Records Wizard. The platform will prompt you to confirm
that the existing script will be replaced. Click Yes.
54
Hello, 1C
Here repeat all the steps that you performed for Cash receipts document.
You only need to change the Register Record Type to Expense and select
the tabular section Expenses. Then click Fill Expressions, and to update
the module click OK.
55
Rapid application development tutorial
You can see that there are only two differences between two documents,
the name of the tabular section and the type of the accumulation register
record.
Start the application in the 1C:Enterprise mode and, using the data
processor, import the Cash payment data from the 07-
CashPayment.xml file. Then, switch to the Finances section and open the
list of Cash payment documents.
56
Hello, 1C
Post these three documents and then verify that the data is recorded to
the Financial transactions accumulation register.
57
Rapid application development tutorial
Reports
The next step in the development of the applied solution will be creation of
convenient reports on activities. Reports as well will be created without any
programming, using only visual design tools.
Reports are located in the Reports branch of the Configuration object
tree. Let us add a new report.
Name the new report Expenses and then click Open data composition
schema of this report.
Figure 7-2. Opening the data composition schema of the Expenses report
Since this is a new report, it does not contain any data composition schema,
the platform will open Template Wizard and suggest you to create a new
template. That template will contain a data composition schema. Agree by
clicking Finish.
58
Hello, 1C
After that, the platform will open the Data composition schema editor.
For now, this composition schema is empty.
Now you will define sources of data that the report will use to retrieve data,
and define the structure of the report.
Add a Data set of type Query. In other words, the data for this report will
be retrieved from the database, managed by 1C:Enterprise.
59
Rapid application development tutorial
You can enter a query manually or use Query builder. Let us use second
way, for that click Query Builder…
In the Query builder window on the left there is a list of tables that can be
used for retrieving data. Expand the AccumulationRegisters branch and
double-click to select FinancialTransactions.BalanceAndTurnovers
table.
60
Hello, 1C
Click the Resources tab. Here, using double-clicks select following fields:
61
Rapid application development tutorial
AmountClosingBalance
AmountOpeningBalance
AmountTurnover
AmountReceipt
AmountExpense
Click the Settings tab. Here, in order to create the structure of the report,
you will use another wizard. To do this, click Open settings wizard .
62
Hello, 1C
On the next step, select fields that will be displayed in the report. Double-
click the following fields in Available fields list:
Person
Event
AmountTurnover
AmountReceipt
AmountExpense
Now we need to select fields that will group the data in the report. Users
would like to see reports on each acquaintance, and on each event
associated with the acquaintance. To achieve this, the list of available fields
double-click on both Person and Event fields to select them as grouping
fields.
After that, click OK. You are now done with defining the structure of the
report.
63
Rapid application development tutorial
It is almost done. Now, give a user an ability to arbitrarily set the report
period. This will be useful when the register will contain large amount of
records accumulated after a long period of using this application. This is
easy to do as under the structure of the report, there are two parameters
available, named Begin of period and End of period.
In the opened window, select the Include in custom settings check box
and click OK.
64
Hello, 1C
After repeating this procedure for both Begin of period and End of
period parameters, continue configuring the report. To do this, close the
data composition schema editor and return to Expenses report editor. Click
the Subsystems tab and include this report in the Finances subsystem.
Start the application in the 1C:Enterprise mode and take a look at the
report. Notice that this report is located in the Finances section. Also,
notice that the platform automatically placed the report in the Reports
menu group.
65
Rapid application development tutorial
Having confirmed that the report works properly and displays records
of the Cash receipt and the Cash expense documents according to
dimensions that were defined for the register, return to the Designer mode.
Create one more simple report that can show the current balance of
available funds. Name it CashBalance and include it in the Finances
subsystem. Similarly, to the Expenses report, click Open data
composition schema for the Cash balance report on the Main tab and
create the data composition schema. Add the data set of the Query type on
the Data sets tab.
Figure 7-22. Adding the query for the Cash balance report
In the opened window, use Query builder as previously. However, for the
new report, select the FinancialTransactions.Balance table.
66
Hello, 1C
Click OK to close Query builder. After this, again you will see the Data
Sets tab of the data composition schema editor. No changes need to be
made here. Click the Resources tab, then double-click the
AmountBalance resource.
Open the Settings tab. Here, use the Data Composition Settings
Wizard once again, confirming the default type, List.
67
Rapid application development tutorial
After selecting fields, click OK because there is nothing else that this
report is required to display. The next thing to do is to include the Period
parameter to Custom settings as you did when configuring the Expenses
report.
68
Hello, 1C
Set the default value of the Period parameter to Beginning of this day so
that the report will automatically display the information for the current
day.
Figure 7-30. Selecting Beginning of this day as the default value of the Period
parameter
Now start the application in the 1C:Enterprise mode and check the report.
69
Rapid application development tutorial
Figure 7-31. Opening the Cash balance report in the 1C:Enterprise mode
Information presented in the report is extremely simple but useful. Now the
user can always check how much money is available now.
Excellent! Now, create another report. After this report will be finished the
CRM application will be complete.
Return to the Designer mode, create a new report, and name it DailyChart,
then include it in the Finances subsystem, and finally click Open data
composition schema. Add the Data set of the Query type, and
then open Query builder.
In the left panel select the FinancialTransactions.BalanceAndTurnovers
table. Up to this point, the process has no difference from
what you did during configuring the Expenses report.
Seeing that the report is named Daily chart you might have guessed that a
new report will display not numeric data but a chart. And now the trick. To
present the data from the register in the suitable for this report format,
select FinancialTransactionsBalanceAndTurnovers table in the
middle panel of Query builder and click Virtual table parameters .
70
Hello, 1C
In the opened window, in the the Periodicity field, select Day and then
click OK to save and close the window.
71
Rapid application development tutorial
Click OK to close Query builder. Then, click the Resources tab and select
the AmountClosingBalance field as a resource.
Click the Settings tab and open Data Composition Settings Wizard. This
time, click Chart. Data is displayed as a chart, and then click Next.
72
Hello, 1C
On the next page, add the Period field to the list in the Points panel on the
right side. Click Next.
On the next page, add Period to order fields on the right panel. Click Next.
On the next page, in the Chart type field select Line. At this point, the
design of chart complete, and you can click OK.
73
Rapid application development tutorial
In the same way as you did for previous reports, include the Begin of
period and the End of period parameters in Custom settings using
Custom settings item property.
Now you can see what you have created. Start the application in
the 1C:Enterprise mode, open the Daily chart report, and then click
Create.
74
Hello, 1C
From this chart users can clearly see the changes in balance of money,
made by Cash receipts and Cash expenses.
75
Rapid application development tutorial
Start page is empty. All sections look the same and contain only the
minimum that was automatically generated by the platform. In next
chapters, you are going to improve this workspace.
Improving subsystems
As the first step, you will set icons for subsystems. This is not a difficult
task. In the Designer mode open the subsystem editor and select the
desired image in the Picture field for each subsystem. Start with
the Contacts subsystem.
76
Hello, 1C
There are no pictures in the applied solution yet, so the list is blank. To
have them available, import images from files. In the opened window, click
Add. You can find images in the current distribution, for this, run
setup.exe, click Custom setup and then click Hello, 1C additional files.
In opened folder, you can find images. Copy them from that folder to your
computer. And then add to the applied solution.
77
Rapid application development tutorial
78
Hello, 1C
Now you can close the window with the picture. In the Select picture
window select the picture that you have just imported, and then click OK.
79
Rapid application development tutorial
Start the appliation in the 1C:Enterprise mode and look what you have now.
Sections panel with newly added icons looks more user-friendly. Now, look
at what is inside of sections. Their appearance is still quite blind. In
Contacts there are only three links to catalogs, and in Events only two.
The Finances section looks a bit more pleasant. Here also included reports
besides documents.
80
Hello, 1C
Add some diversity to the content of sections. Open the list of available
commands for subsystems, and activate those commands that may be
useful to users. Start with the Contacts subsystem. Open the subsystem
editor, and click Command interface.
81
Rapid application development tutorial
82
Hello, 1C
Start the application in the 1C:Enterprise mode and take a look at the
interface now. Well, links in the Contacts section look more orderly. The
People catalog can be easily found now, which is convenient, considering
that users will work with this catalog more often than with others. In
addition, there is a new command group for creating new catalog items in
this section.
Look at the interface of the Events section, which now looks more
complete.
83
Rapid application development tutorial
Now, look at the Finances section. This time all objects that the user might
need are easily accessible. For example, you no longer need to open All
functions in Main menu each time when you want to view records of
the Financial transactions register.
84
Hello, 1C
Start page
You have managed the lack of navigation links in subsystems. But Start
page, which is the first page that the user sees when open an application in
the 1C:Enterprise mode, is still empty.
You definitely want to make things right. To do this, return to the Designer
mode, open Properties of the Configuration root node, and click on Open
link of Start page working area field.
85
Rapid application development tutorial
There are a few things that you can change here for now, which is why
simply select Two columns, different width (2:1) as the value of
the Starting page template field.
The feature of Start page is that you can place there only those forms
that are explicitly created in the Configuration object tree. Thus, the first
thing you need to do is to create forms using Form Wizard. Those forms
are the list form of the Financial transactions accumulation register, the
list form of the People catalog, and the report form of the Cash balance
report.
It is easy to do. In the Configuration object tree, select the configuration
object, for which you are going to add a form. Expand this branch and right-
click Forms node inside of it, then click Add (Ins).
86
Hello, 1C
Figure 8-21. Adding the list form for the Financial transactions accumulation
register
The Accumulation Register Form Wizard window will open. In this case,
the default option Accumulation register list form is the required one to
create the desired list form, so simply click Finish.
Find the People catalog in the Configuration object tree, and add a list
form for this catalog as well.
87
Rapid application development tutorial
Click Catalog list form in the Select form type panel, and click Finish.
Now create the report form for the Cash balance report.
Figure 8-25. Adding a report form for the Cash balance report
Click Report form in the Select form type panel and click Finish.
88
Hello, 1C
Return to the Starting page work area editor. This time you will be able
to customize its appearance by adding to it newly created forms. Let it have
an appearance with the Financial transactions register list form and
the Cash balance report form on the left side, and the People catalog list
form on the right side.
For implementing this, click Add above the Left column list and
select the list form of the Financial transactions accumulation register,
and then click OK.
Figure 8-27. Adding the list form of the Financial transactions accumulation
register to Start page
In the same way, add the report form of the Cash balance report.
89
Rapid application development tutorial
Figure 8-28. Adding the Cash balance report form to Start page
Repeat the same steps for Right column of Start page. Here, add the list
form of the People catalog.
Start the application in the 1C:Enterprise mode and look at Start page.
90
Hello, 1C
Now Start page looks more useful. From here users can easily check
financial transactions, manage the People catalog, and see how much cash
they have available at a moment.
At the current moment, only three objects are available on Start page.
What if users would like to have more objects available? Is it necessary to
create object forms for all of them and then manually place each one of
them on the Start page? No, it is not necessary. If you place many forms
on Start page, the interface will be overloaded and thus not user friendly.
To make users able to access more objects from Start page without
making the interface of it overloaded, you can adjust Command interface
of Main section as you did with Command interface of subsystems.
In the Designer mode open Properties of root node in the Configuration
object tree, and click Open link of Main section command interface
property.
91
Rapid application development tutorial
92
Hello, 1C
See how Start page looks now. Start the application in the 1C:Enterprise
mode.
Figure 8-33. Adjusted Command interface of Start page in the 1C:Enterprise mode
93
Rapid application development tutorial
Managed forms
If you look more precisely at register and catalog lists on Start page, you
will see that the information is not very conveniently displayed. In the
register list, there is odd information, but on contrary, in the catalog list it is
not enough.
To amend the situation, return to the Designer mode. Start with the register
and open the recently created list form of the Financial transactions
accumulation register.
Until now, all forms that you saw were generated automatically, even those
that were created with one click to be placed on Start page.
There is no need to manually draw forms in 1C:Enterprise 8. The developer
only needs to configure the form composition in a hierarchical tree inside
the top panel of the form editor, and the appearance of the resulting form is
displayed as a preview inside the bottom panel of the form editor.
The platform automatically calculates positions and sizes of items on the
form.
94
Hello, 1C
Now, you will configure this list form. Remove odd the Recorder and
the LineNumber attributes. Select the desired attribute in the list, and click
Delete current item (Del).
After deletion of odd form items, the platform will redraw the form and
display the preview as a user will see it in the 1C:Enterprise mode. The
current form will look as follows:
95
Rapid application development tutorial
Then give a more user-friendly name to the Period form item let it be
Date.
Now, start the application in 1C:Enterprise mode and look at the list form of
the accumulation register.
Figure 8-43. The list form of the Financial transactions accumulation register
You can verify on your own whether this form looks the same by opening it
in the Finances section or by opening Main menu , then clicking All
96
Hello, 1C
functions... and opening this form in the form list. The form will look the
same. Settings of the managed form are applied to all places of the applied
solution where this form is used.
Continue to the People catalog. The People list on Start page currently
contains less information. Besides, the Description word does not clearly
present what is contained in the corresponding column. In addition, the list
includes the Code column that seems not very useful to users.
As a start, you will change Synonym of the Description attribute to Full
name. One way to do this is to open a list form and in Properties of
the Description form item enter a synonym, as you did for the Period
form item in the list form of the Financial transactions accumulation
register.
However, this time, a different procedure is more suitable. There are
several forms in the People catalog now, the list form and the catalog item
form. The list form was created in the Designer mode, and the catalog item
form is generated automatically by the platform. If you will change
Synonym in the list form only, the catalog item form will not be changed.
Therefore, it is better to change Synonym to Full name in one place,
which is Properties of Standard attribute. To do this, find the People
catalog in the Configuration object tree, right-click on it and then click
Standard attributes.
97
Rapid application development tutorial
Figure 8-46. Enabling the Multiline mode and the Extended edit options
Next, open the list form of the People catalog and delete the Code form
item. Then to add the Comment column to the list, expand the List form
attribute in the right panel and drag the Comment attribute inside the List
form table in the left panel.
Set Width properties of the Description and the Comment form items to
10. You can select more than one form item by holding down Ctrl key and
98
Hello, 1C
clicking on each attribute. When more than one form item is selected, you
can change most properties for all of them in Properties.
Now, start the application in the 1C:Enterprise mode and review the
changes to the list form of the People catalog. This time the People list on
Start page looks more useful.
The list form of the People catalog is also updated in the Contacts section
where it is also placed. In addition, the item form of the catalog, which is
generated by the platform automatically, also reflected all changes that you
have recently made, such as Synonym of Description attribute and
Multiline mode of Comment attribute.
99
Rapid application development tutorial
Figure 8-51. Setting Synonym for the Participant attribute of tabular section
Figure 8-52. Enabling the Multiline mode and the Extended edit options
Now, you can review the changes. The Events catalog now looks much
better.
100
Hello, 1C
Object presentations
Figure 8-54. Same names for opening the list form and creating a new item
101
Rapid application development tutorial
Check how it looks like. Now names in the Create group are more
grammatical.
Now, try to change Relation type of the People catalog item or Category
of Event, or Type in one of rows of contacts of a person. When you click a
field that allows selecting values, to select a value you can either start
typing first characters of a value description or click the Show all link and
see the list of all items in a separate window. If you used the second
method, to select a value, click the row with that value and then click
Select or simply double-click the row.
102
Hello, 1C
103
Rapid application development tutorial
Adjusting reports
Look at the Daily chart report. In general, it is fine, but a user may be
confused about some technical information, the format of dates, and the
legend. In addition, it would be much better to be able to see points of the
plot directly on the chart, not only when hovering over them with the
mouse.
104
Hello, 1C
105
Rapid application development tutorial
Do the same with the Period field, change its title to Date.
Now for the Period field change the date format. Enter the appearance
column of Period by clicking Select .
Open the Field format editor, and find the Format property.
106
Hello, 1C
Open Format String Wizard by clicking Select , and then click the Date
tab and in the Date format field enter MM/dd/yyyy. After that, click OK.
Next, click OK to close the Field format editor. After that value in the
Appearance column on the Data Set tab for the Period field will look as
follows:
The last thing is left to do is to adjust view of plot points. To do this, click
the Settings tab. Then, on the bottom tabs click the Other settings tab.
107
Rapid application development tutorial
Find the Label list parameter under Chart type, and then from the drop-
down list select Value.
Figure 8-69. Selecting Value as a value of the Label list parameter of Chart type
108
Hello, 1C
Report variants
You might ask the right question: "Do I have to open the report the
Designer mode each time when I need to change its view settings?" After
all, the user might not be able or allowed to use the Designer mode, for
example, when connecting through HTTP protocol. The answer is no, you do
not have to use the Designer mode each time you need
to change something in the report settings. Most of report settings,
including view settings, can be changed in the 1C:Enterprise mode without
engaging a developer.
As an example, you will change the Expenses report. The default view of
the report, meaning the settings that the developer made for it, are as
follows:
109
Rapid application development tutorial
Imagine that a chart would be easier for the analysis, so you need to
change the report into a chart. Click More and then click Change
variant...
You will see the report settings window, the same as you used in the
Designer mode when configured the data composition schema for this
report. The default settings are displayed. The one that you have configured
in the Designer mode for this report.
Click the Person node, and then click Delete (Del) to delete these settings.
Confirm the deletion when the dialog appears.
110
Hello, 1C
After that, right-click the Report node, and in the context menu click New
chart.
Next, right-click the Points node, and in the context menu click New
grouping... In the opened window, select the Event field.
111
Rapid application development tutorial
Then, right-click the Series node, and in the context menu click New
grouping... In the opened window, select the Person field.
Now, click the Report node, then click the Fields tab.
112
Hello, 1C
On the Fields tab check that the Amount Turnover field is placed right
after Person and Event fields. In addition, check boxes on the left
from Amount Receipt and Amount Expense fields are cleared.
Now click the Additional settings tab, and for the Chart type property
select Bar Graph.
113
Rapid application development tutorial
In the report window, click Create and see how dramatically the
appearance of the report has changed. Now the user can clearly see what
the most money is being spent for.
114
Hello, 1C
You do not need to change the default settings of the report because the
platform provides convenient save and load commands for report variants.
Click More and then click Save variant...
115
Rapid application development tutorial
In the future, you will be able to use this variant as many times as it will be
necessary. To load the report variant click Select variant...
Note that you can always restore the version that was created by the
developer in the Designer mode because it is listed as Default in the list of
report variants.
116
Hello, 1C
117
Rapid application development tutorial
Functional options
Another useful part of 1C:Enterprise 8 is the functional options feature.
Functional options allow you to group some of applied solution features and
then with a single click manage whether the set of features will be used in
the specific application or not.
Functional options are advantageous during the applied solution
implementation. For example, the CRM that you create in this tutorial
include three accounting sections: managing people, events, and finances.
If you will decide to share your applied solution with your friends or to
enhance its functionally and sell, you will see that not everything that the
applied solution is capable of is useful for each user. For example, not
everyone will need to keep all events that occur in his or her life. However,
maintaining a list of acquaintances and keeping records of money income
and outgoings is useful for most users.
Thus, keeping in mind that someone may find events feature not useful,
you can segregate it to the functional option and let a user to decide
whether to use it or not. If you do so, 1C:Enterprise 8 platform will maintain
all references to objects of the functional option in all parts of the applied
solution. Moreover, if the user does not need features of the functional
option, the platform will automatically disable and hide those objects.
The platform will perform all these changes on its own, so that the
developer does not need to write the script for that. The only thing that is
required is to set the desired value of the functional option in
the 1C:Enterprise mode!
Consider a simple example where the value of the functional option is
stored in the constant of the Boolean type. If the value is True, then the
functional option is enabled. If the value is False, then the functional option
is disabled.
Because you are creating the first custom option of the application, it is a
good time to create the Settings subsystem, and specify the
SettingsSubsystem.png icon for it.
118
Hello, 1C
Create a constant.
After that, right-click the UseEvents node in the Configuration tree and
then click More in the context menu.
119
Rapid application development tutorial
Then create the Use events functional option and adjust it to keep its value
in the Use events constant. For that click Functional options node in the
Configuration tree, then click Add (Ins) in the command bar of the
Configuration tree. Then input UseEvents as the name of the functional
option, and then select UseEvents constant in the Data path property.
120
Hello, 1C
Because of these actions, a command that allows to open the form and
change the value of Use events functional option in the 1C:Enterprise
mode will appear in the Settings section.
Now you need to include configuration objects and object properties to the
functional option. Ask yourself: "What in your applied solution is related to
events?" The answer is:
It is very easy to include the mentioned above objects and properties to the
Use events functional option. To do this, double-click the Use events
functional option to open it in the editor and then click Content tab. After
that, in the tree on top set check boxes on the left of configuration objects
and object properties. For verification see the panel on bottom that the
platform fills with selected objects.
121
Rapid application development tutorial
Now, start the application in the 1C:Enterprise mode, click the Settings
section, click the Tools menu, and then click Use events.
Enable Use events to make sure that the created functional option did not
affect anything in the application. For this, select the Use events check
box, and then click Save and close.
122
Hello, 1C
Close the main application window and start the application in the
1C:Enterprise mode once again to see that the application works same as it
was before you created the functional option.
Now, in the Settings section disable Use events functional option.
Figure 9-13. The Events section and Events catalog are disappeared
123
Rapid application development tutorial
Figure 9-14. The Events column in the list form and Event details of the report are
disappeared
You made what was required, the use of events in the applied solution is
now optional and depends on settings of a specific application.
124
Hello, 1C
Cross-platform design
Now it is time to explain on what operating systems and devices you can
run your application.
Linux
You can use the application that you have developed in this tutorial without
any modification both on computers with Microsoft Windows and Linux
operating systems.
1C:Enterprise 8.3 platform have introduced following analogs of already
available for Microsoft Windows client applications:
Client applications support both file and client/server modes. They are
available both for x86 and x86-64 architectures.
This means that now not only the 1C:Enterprise mode users can work on
Linux, but also developers and administrators.
The full list of supported operating systems you can read in System
requirements.
In Linux, the application will look and feel the same as it does on Microsoft
Windows.
125
Rapid application development tutorial
Web client
It is a common situation when you are not at your workplace, but need
some data urgently. In this case, an access through the Internet using a
web browser might save you.
It is no doubt that you can develop a web interface for any system. To do
this you need to develop, debug and deploy it as well as maintain
compatibility with different web browsers. 1C:Enterprise platform allows
developers to save efforts on development of the web interface.
The platform allows you almost in a single click publish on the web
server entire the application that you have developed in this tutorial. After
that, users will be able to access the application using regular web
browsers. At the time of writing this book there are four supported web
browsers, they are: Microsoft Internet Explorer, Mozilla Firefox, Google
Chrome, and Apple Safari.
This means that users do not need to install any of 1C:Enterprise
applications or licenses, the only requirements are the connection to the
Internet and one of supported web browsers. At the same time, you will
need to have a server where 1C:Enterprise platform and a web server are
installed. At the time of writing this book there are two supported web
servers, they are: Microsoft IIS and Apache.
To install the web server, click Start, then click Control panel, and then
click Uninstall a program. On the navigation panel click Turn Windows
features on or off. In Windows Features, select Internet Information
126
Hello, 1C
Services. The default set of features is enough. Click OK to setup and close
this window.
To publish web client you need to have the Web server extension
modules component of 1C:Enterprise platform installed. To install
the component, click Start, then click Control panel, then click Uninstall
a program, in the list of applications find 1C:Enterprise 8 (training
version) (<version number>) and select it. The version must match the
version that you use for publishing the application. Then click Change
on top of the list. In the installation wizard select the Modify option,
and click Next.
127
Rapid application development tutorial
On the next page select This feature, and all subfeatures, will be
installed on local hard drive for Web server extension modules. After
that, follow the wizard confirming default settings.
In the Publish to web server wizard in Name field input hello_1c and in
Directory field see that the last folder is changed to hello_1c. Then, click
Publish.
128
Hello, 1C
The platform will ask for confirmations during publishing. Agree with them.
After the application is published, you can access it from any place around
the world. To connect to the application you will need to know only its URL.
Notice: Details of configuring web servers are skipped in this book. In
short, you will need to let IIS_IUSRS user on the server an access to
1C:Enterprise installation bin folder, to the folder that you have specified in
Directory field of the Publish to web server wizard, and to the folder
where your infobase is placed. Then, you need to enable Anonymous
Authentication in Authentication settings of the hello_1c IIS
application and for 64-bit Windows you need to set to True value of Enable
32-Bit Applications in advanced settings of the DefaultAppPool
application pool.
In the tutorial you run it on your local computer, thus the URL will be local
only. To log on type http://localhost/hello_1c in the address bar of your
web browser and you will see the 1C:Enterprise interface, with which you
are already familiar.
129
Rapid application development tutorial
As it is said above, you can use your favorite web browser to work with
your application.
130
Hello, 1C
Mobile platform
One more interesting thing is that the application that you have developed
with almost no efforts can be started on iOS or Android mobile devices. This
feature is provided by the mobile platform that is a part of 1C:Enterprise
8.3 platform.
The look and feel of applications for Android and iOS devices can be a slight
different.
Notice: Systematic instructions on how to create a mobile application for
end users you can find in 1C mobile application rapid application
131
Rapid application development tutorial
development tutorial. In this tutorial, you are going to start your application
in the mobile platform for developers.
Details on features of applications based on 1C:Enterprise platform for
mobile devices you can see in Chapter 25. Developing solutions for the
mobile platform of 1C:Enterprise 8.3. Developer guide.
1C:Enterprise 8 mobile platform is a set of tools that let you to create
applications that work on Android or iOS mobile devices. Those devices are
mostly smartphones and tablet PCs.
The 1C:Enterprise mobile application that you install on the mobile device is
a combination of the mobile platform and the infobase. The mobile infobase
is similar to the file infobase. It consists of a database that stores data in a
file and a mobile applied solution that is a program, which can be started on
a mobile device and manage data in the database.
Thanks to the mobile platform you can right now, without using any third-
party IDE, install, start, and see how works your application on the mobile
device. As an example, you will do this for the Android device.
For this, you will need following:
Make your applied solution compatible with the mobile platform. You
will have to do a few changes for that.
The mobile platform for developers installed on an Android mobile
device.
The web server running on the computer where you develop the
application, and accessible by IP from your mobile device.
132
Hello, 1C
You can set the name for the current set of configuration verification options
to make it easier to repeat this verification later. Let it be Mobile. Select
following check boxes:
Click OK.
133
Rapid application development tutorial
The configuration will be verified for compatibility with the mobile platform.
The result of this verification will be 11 errors.
Those errors should not make you worry. Here they are:
134
Hello, 1C
If you look carefully, you might mention that there are several unsupported
by the mobile platform features used in your application. This happened
because until this moment you did not take care of compatibility with
mobile devices and used all features that you needed.
Now, as a simplest way, you will delete the use unsupported by the mobile
platform features and configure Mobile desktop that will be compatible
with the mobile platform.
Notice: To backup the current application, you can in the Designer mode in
Main menu click Administration, and then click Dump infobase... In the
opened dialog select a file name and click Save. To restore the
application, in Main menu click Administration, and then click Restore
infobase... In the opened dialog select the previously saved DT file, and
click Open.
So, delete all subsystems, functional options, and reports.
135
Rapid application development tutorial
Name it MobileDesktop and set Synonym to Hello, 1C. The form type
should stay Generic form as for default. After that, click Finish.
136
Hello, 1C
It seems reasonable that users would like to see the most often
used People and Events lists on the Mobile desktop. To provide this
information to users, create two attributes of the DynamicList type. The
first one will be People. To add the form attribute, in the top right panel of
the form editor click Add attribute (Ins). In Properties of the new
attribute set Name value to People, and then click Select of the Type
property, then select DynamicList.
For the MainTable property, click Select , then in Select table select
the People catalog, and then click OK.
137
Rapid application development tutorial
In the same way, add the Events attribute. With the only difference, the
MainTable property will be the Events catalog.
Now, drag both attributes to the Form node on the top left panel of the
form editor. You can select more than one form attribute by holding the Ctrl
key and clicking form attributes, and then drag them all at a time to the
destination.
On the opened confirmation dialog, click Yes to agree that columns of both
tables will be added to the form automatically.
138
Hello, 1C
After that, you will have two tables on the form, displaying all attributes of
the Events and the People catalogs.
Delete not required columns from the form. For that, in the People table
holding the Ctrl key select PeopleCode, PeopleGender, and
PeopleRelationType and then click Delete current item (Del).
Figure 12-15. Deleting not required columns from the People table
Figure 12-16. Deleting not required columns from the Events table
Open the Starting page work area editor (see Figure 8-19). For that,
right-click the root node of the Configuration tree and then click Open
start page work area. Delete the Financial transactions accumulation
register list form from the Left column and the People catalog list form
from the Right column. In Starting page template, select One column.
After that, add the MobileDesktop common form to the list of forms.
139
Rapid application development tutorial
Now, you are done with the configuration changes. To save them press
the F7 key. You can check the configuration again (see Figure 12-2), this
time there will be no errors found.
The last step is to upload and start this application on the mobile device.
You will use the tool that is similar to publication on the web server that
was described in Web client chapter on page 126.
The web server will keep the application as a single XML file. The mobile
platform for developers connects to this web server, downloads that XML
file and installs on the mobile device. After that, the application can be
started on the mobile device.
In the Designer mode in Main menu click Configuration, then click
Mobile application, and then click Publish...
140
Hello, 1C
In the opened window select the Create virtual directory on web server
and Update mobile application when a database configuration is
updated check boxes, and input hello_1c_mob in Name. See that the
last folder in Directory is also changed to hello_1c_mob. Then, click
Publish.
Confirm all actions that the platform will ask confirmation for, and your
application will be published.
To install and start the application on iOS devices in the developer
mode you will need the developer account. Moreover, you will need a
Macintosh computer with XCode developer environment.
For Android devices, you only need to install 1C:Enterprise mobile platform
for developers using packages that are available in the distribution kit of
1C:Enterprise mobile platform.
For this, upload one of APK installation packages to the mobile device, for
example using USB cable. These files are available in Android folder of the
distribution kit. Install 1cem-arm.apk if you have a device with ARM
141
Rapid application development tutorial
Figure 12-20. Mobile application for developer installation packages for Android
142
Hello, 1C
When you will have the mobile platform for developers installed, tap
1C:Enterprise icon to start it.
143
Rapid application development tutorial
If you start the mobile platform for the first time, it will show you an empty
list of applications. To add a new application, tap Add application.
144
Hello, 1C
Then, the mobile platform will suggest you to adjust some properties.
Leave Application name as it is and select the Restart from designer
check box. Then, tap Done.
You will see the application in the list of applications. To start it, tap the
application name.
145
Rapid application development tutorial
The first screen that you see after that is the Mobile desktop form.
If you tap menu button of your mobile device you will see the application
menu. Notice that the command interface of the Main section is displayed
in the application menu in mobile platform.
146
Hello, 1C
The important notice: the application that you developed and filled with
data, when opened on the mobile device contains no data. This is not an
error. The data synchronization between several applications is an
interesting, but separate topic. The 1C:Enterprise platform can solve these
problems with ease. For an example, see Homework 3 of 1C mobile
application rapid application development tutorial.
In this chapter spending only a few minutes you developed a mobile version
of your CRM application, which is compatible with Android and iOS mobile
devices.
To distribute your application for end users you need to create a solid
package containing the mobile platform, the applied solution, and the
database. For this, 1C:Enterprise platform has packing tools. You can read
more about it in Mobile application building example chapter of 1C mobile
application rapid application development tutorial. The packed application
can be published in Google Play and Apple App Store.
147
Rapid application development tutorial
148
Hello, 1C
1C:AccountingSuite demo
You can find this application description, download files and support in
1C:AccountingSuite section of 1C:Developer Network.
150
Hello, 1C
Business automation
1C Company has built a software development, distribution, and
implementation business, which has enabled thousands of companies
to start and grow profitable business. By automation of management and
accounting fields 1C Company provided hundreds of thousands of
companies and individuals with an access to the mission-critical information.
1C Company created a prestigious profession and even industry. Hundreds
of thousands of competent professionals are helping companes and
individuals to improve their efficiency by using the state-of-art
1C:Enterprise automation platform (see page 151).
Most of employees of 1C Company and its partners graduated from
universities and colleges. Therefore, one of 1C Company priorities, as the
leading software developer, is to cooperate with students and educational
institutions to give young people the opportunity to gain practical skills of
working with 1C:Enterprise platform. As well as to assist in employment to
the position that allows to utilize acquired skills.
1C:Enterprise 8
1C:Enterprise 8 offers:
151
Rapid application development tutorial
1C partners
152
Hello, 1C
Support
List of 1C partners
News for partners and users
Information on training and certification
Press information
Price list
Jobs
153
Rapid application development tutorial
About 1C Company
1C Company was established in 1991, for the purposes of software
development, distribution, publishing, and support of computer applications
and databases for business and home use. 1C Company works with clients
through more than 10,000 partners in 600 of 23 countries to provide
integration services for the automation of businesses.
Apart from 1C:Enterprise, the best-known 1C Company business lines are
software products for home use and educational applications.
The 1C:Enterprise collection of applications is used daily by several million
users in business and government to automate operations, accounting,
finance, HR, and management activities. 1C Company provides an array of
vertical solutions for manufacturing, distribution, and service businesses.
With its innovative 1C:Enterprise platform, and a range of other
applications, 1C Company has achieved wide popularity for its openness,
fast modifications and software updates. 1C:Enterprise is a very flexible and
scalable platform, which meets the needs of companies ranging in size from
a single user to hundreds of users. 1C Company is the market leader in
enterprise automation in Russia, Ukraine, Kazakhstan, and Belarus and is
used widely in the global market.
For references visit: 1C:Developer Network.
154