Custom Field Settings: Overview of Methods

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

The methods userfieldconfig.* manage custom fields: they return available field types, create a field for the desired object, read its settings, update parameters, and delete the field.

Technically, the handler for these methods resides in the main module, but in REST, they are available as a separate group userfieldconfig.* and use the scope userfieldconfig. In AJAX, the same handler is called as main.userfieldconfig.*.

In all userfieldconfig.* methods, moduleId is passed, which determines the module context and access permissions for the fields. Therefore, the application requires not only the userfieldconfig scope but also the module scope from moduleId. For example, to modify fields in the Business Automation module, both userfieldconfig and rpa scopes are needed.

Quick Navigation: All Methods

User Documentation: Custom Fields in CRM

Getting Started

  1. Determine the moduleId and the format of entityId for the desired object.
  2. Access available field types through userfieldconfig.getTypes.
  3. Create a field using the userfieldconfig.add method.
  4. Retrieve the list of custom field settings through userfieldconfig.list or the settings of a specific field through userfieldconfig.get.
  5. If necessary, modify or delete the field using the userfieldconfig.update and userfieldconfig.delete methods.

Relationships with Other Objects

CRM. The relationship of fields with CRM objects is defined by the pair moduleId=crm and the entityId of the specific CRM object. For smart processes, obtain the ID using the crm.type.list method, then pass the entityId. For other objects, such as leads, contacts, and companies, use fixed identifiers.

RPA. When working with Business Automation processes, use moduleId=rpa. Pass the process identifier in entityId.

The userfieldconfig.* methods also work in other modules if the module supports custom fields. For example, for inventory management, use moduleId=catalog and the format entityId for warehouse documents. For details, see the section Custom Fields for Inventory Documents.

Identifiers for entityId

The association of a field with an object is defined by the value of entityId.

CRM with Fixed Identifiers

  • CRM_LEAD — lead
  • CRM_CONTACT — contact
  • CRM_COMPANY — company
  • CRM_DEAL — deal
  • CRM_QUOTE — estimate
  • CRM_INVOICE — invoice
  • CRM_SMART_INVOICE — new invoice
  • CRM_REQUISITE — requisite
  • CRM_SMART_DOCUMENT — CRM document
  • CRM_SMART_B2E_DOC — B2E document

CRM Smart Processes

For a smart process, the format CRM_{id} is used, where id is the id key from the result of the crm.type.list method. This is not entityTypeId: for a smart process with id = 13 and entityTypeId = 156, the entityId value is CRM_13.

RPA

In the rpa module, the format RPA_{id} is used, where id is the process identifier.

Typical use-cases and scenarios

Overview of Methods

Scope: userfieldconfig, module scope from moduleId (e.g., crm)

Who can execute the method: depending on the method

Method

Description

userfieldconfig.add

Creates a custom field

userfieldconfig.update

Updates the settings of a custom field

userfieldconfig.get

Retrieves the settings of a custom field by identifier

userfieldconfig.list

Retrieves a list of custom field settings

userfieldconfig.delete

Deletes a custom field

userfieldconfig.getTypes

Retrieves available types of custom fields for the module

Events

Bitrix24 sends events when the custom fields of smart processes, new invoices, and documents for signing change. How to subscribe and what the handler receives is described in the Events When Working with Custom Field Settings section.

Scope: crm

Who can subscribe: any user

Event

Triggered

onCrmTypeUserFieldAdd

When a custom field is added manually or via the userfieldconfig.add method

onCrmTypeUserFieldUpdate

When the settings of a custom field are changed manually or via the userfieldconfig.update method

onCrmTypeUserFieldDelete

When a custom field is deleted manually or via the userfieldconfig.delete method

onCrmTypeUserFieldSetEnumValues

When the set of values of a list-type custom field is changed manually or via the userfieldconfig.add and userfieldconfig.update methods

Custom fields of leads, contacts, companies, deals, estimates, and requisites have their own events. No events are sent for fields in the rpa and catalog modules.

Continue Learning