S
S
Sergey2020-06-25 08:36:12
Bitrix24
Sergey, 2020-06-25 08:36:12

How to automatically (using a SQL query?) place employees in some department in Bitrix24?

I put a test box of Bitrix24, I'm starting to understand it. It is necessary to prepare a telephone directory of the company for several dozen employees. Made a list of users, drove all the necessary fields into a file, imported. Employees appeared in the list of the admin panel, but not on the site in the telephone directory. I look at the user's parameters - in the structure of the organization there is no link to the department. I manually indicate the department - the person appears in the telephone directory. I want to massively update the database so that all employees have a department. Tell me, in which table is this data stored, or how else can this action be applied to several dozen people?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Nikolaev, 2020-06-25
@sergey_privacy

1) Never work with Bitrix24 via SQL.
Bitrix is ​​not designed for insert/update/delete via sql. You can only do this if you fully understand the structure of tables and understand that after performing these steps, you may end up with a broken portal.
The maximum that can be used: select queries.
2) In order to do this "without bothering" with sql/php/rest api, you can use the administrative panel (hidden by default, so you need to go to /bitrix/).
And there, through the list of users, you can place them in the desired department.
5ef43f7412ff5432681068.png

A
Artem, 2020-06-25
@artemky

you don't have to study the structure of the tables and execute the sql query. On the box, use the bitrix-framework methods. To "apply this action to several dozen people", get their id and update the UF_DEPARTMENT field for each using the CUser::Update method

S
scottparker, 2020-06-25
@scottparker

this can be done with rest api and user. update , but the application needs to be created there

Y
Yuri Paimurzin, 2020-06-25
@rusellsystems

If you get acquainted with the basic official free courses, then there will be no such questions:
https://dev.1c-bitrix.ru/learning/course/index.php...
https://academy.1c-bitrix.ru/training/ course/7252/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question