Answer the question
In order to leave comments, you need to log in
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
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.
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
this can be done with rest api and user. update , but the application needs to be created there
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 questionAsk a Question
731 491 924 answers to any question