Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 4.96 KB

File metadata and controls

70 lines (43 loc) · 4.96 KB

Universal List Elements: Overview of Methods

{% note tip "" %}

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

{% endnote %}

Elements are records of a universal list. Each element stores list field values: text, numbers, dates, files, links to CRM, and other data. Fields can be added and configured using the methods lists.field.*.

Quick navigation: all methods

User documentation: How to add list elements

Getting Started with Elements

  1. Retrieve list parameters using the lists.get method.
  2. Retrieve list fields using the lists.field.get method to know the codes and value types.
  3. Create an element using the lists.element.add method.
  4. Retrieve, update, and delete elements using the lists.element.get, lists.element.update, and lists.element.delete methods.

Relationships with Other Objects

Universal Lists. Elements are created within lists. To add an element to a list, specify the parameters IBLOCK_TYPE_ID, IBLOCK_ID, and IBLOCK_CODE. Values can be obtained using the method lists.get.

List Sections. An element can be placed in a section using the parameter IBLOCK_SECTION_ID. The section identifier can be obtained using the method lists.section.get.

Elements from Other Lists. The field type Link to elements connects elements from different lists. In such a field, you can select another list and specify its elements as values. The ID of the selected elements is stored within the field, while their names are displayed.

For example, if you already have a list called Sizes with elements: XS, S, M, L, then in the Products list, you create a field of type Link to elements and specify the Sizes list. Now, when you add a product, you don't enter sizes manually but select the required elements from the list — for instance, S and M.

To obtain the list identifier, use the method lists.get. The element identifier can be retrieved using the method lists.element.get.

CRM Objects. The field type Link to CRM elements connects list elements with CRM objects: leads, deals, SPAs, contacts, and companies. In list elements, this field is displayed as a link to the CRM object, and in the CRM card itself, a tab with the list name appears.

The format of the field value depends on the settings.

  • If the field settings allow linking to only one object, fill the field value with the object identifier without a symbolic prefix. For example, 3 — contact. Otherwise, the field will be displayed but not exported to Excel.

  • If linking to multiple objects is allowed, fill the field value with the identifier with a prefix. For example, C_3 — contact.

Users. To work with users in list elements, fields of type Link to employee, Created by, and Modified by are used. The values in the Created by and Modified by fields are automatically filled by the system. For fields of type Link to employee, data must be provided manually.

The user identifier can be obtained using the method user.get.

Drive. The field type File (Drive) connects list elements with the Drive. To add a file to the element's field:

Overview of Methods {#all-methods}

Scope: lists

Who can execute the method: depending on the method

#| || Method | Description || || lists.element.add | Creates a list element || || lists.element.update | Updates a list element || || lists.element.get | Returns an element or a list of elements || || lists.element.delete | Deletes a list element || || lists.element.get.file.url | Returns the file path || |#