Custom Fields in Tasks: Overview of Methods

In a task, there is a set of system fields: Assignee, watchers, due date, tags, and so on. If the system fields are insufficient, you can create your own—custom fields. Custom fields allow you to store information in various data formats: string, number, date with time, and yes/no.

Quick navigation: all methods and events

User documentation: Custom fields for tasks

Features

When creating a custom field using the task.item.userfield.add method, the field name FIELD_NAME must include the prefix UF_. If the prefix is not specified, the system will automatically add it to the beginning of the name.
You can retrieve a list of all custom fields for tasks using the task.item.userfield.getlist method. The list will include three system fields for tasks that link to other objects:

  • UF_CRM_TASK — with CRM objects
  • UF_MAIL_MESSAGE — with the email message
  • UF_TASK_WEBDAV_FILES — with Drive files

These are created based on custom fields, so they appear in the list. More about the relationships of tasks with other objects can be found in the article Tasks: Overview of Methods.

Overview of Methods

Scope: task

Who can execute the method: depending on the method

Method

Description

task.item.userfield.add

Creates a custom field

task.item.userfield.update

Updates a custom field

task.item.userfield.get

Retrieves a field by identifier id

task.item.userfield.getlist

Retrieves a list of fields

task.item.userfield.delete

Deletes a custom field

task.item.userfield.gettypes

Retrieves all available data types

task.item.userfield.getfields

Retrieves all available fields of the custom field