Working with Custom Fields

The following methods manage values of custom fields for a ticket, user, or group object.

Adding Values to a Custom Field in an Object

The addObjectCustomField method adds one or more values to a custom field in a specific object, such as a ticket, user, or group.

Note: If the maximum number of values for a field is exceeded, existing field values are deleted.

Request Type: addObjectCustomField

Element

Type

Description

sessionIdMandatory

String

Client’s session identifier.

objectTypeMandatory

String

Type of object:

  • ticket
  • user
  • group
objectIDMandatory

Integer

ID of the ticket, user, or group.

customFieldsMandatory

List of customField

One or more custom field objects. See CustomField Type (see CustomField Type ).

Response Type: addObjectCustomField

Element

Type

Description

resultMandatory

Integer

Method result. A value of 1 indicates success.

Possible failure values are:

  • Session not authenticated
  • Bad object ID
  • Bad custom field name
  • Action failed

Back to top

Deleting All Values for a Custom Field in an Object

The deleteObjectCustomField method deletes all values of one or more custom fields for a specific object, such as a ticket, user, or group.

Request Type: deleteObjectCustomField

Element

Type

Description

sessionIdMandatory

String

Client’s session identifier.

objectTypeMandatory

String

Type of object:

  • ticket
  • user
  • group
objectIDMandatory

Integer

ID of the ticket, user, or group.

customFieldsMandatory

List of customField

One or more custom field objects. See CustomField Type (see CustomField Type ).

Response Type: deleteObjectCustomField

Element

Type

Description

resultMandatory

Integer

Method result. A value of 1 indicates success.

Possible failure values are:

  • Session not authenticated
  • Bad object ID
  • Bad custom field name
  • Action failed

Back to top

Updating a Custom Field in an Object

The updateObjectCustomField method replaces the value of one or more custom fields for a specific object, such as a ticket, user, or group.

Request Type: updateObjectCustomField

Element

Type

Description

sessionIdMandatory

String

Client’s session identifier.

objectTypeMandatory

String

Type of object:

  • ticket
  • user
  • group
objectIDMandatory

Integer

ID of the ticket, user, or group.

customFieldsMandatory

List of customField

One or more custom field objects. See CustomField Type (see CustomField Type ).

Response Type: updateObjectCustomField

Element

Type

Description

resultMandatory

Integer

Method result. A value of 1 indicates success.

Possible failure values are:

  • Session not authenticated
  • Bad object ID
  • Bad custom field name
  • Action failed

Back to top