update_custom_field

The update_custom_field function is used to create, update, or delete custom fields.

Copied!
svc=item/update_custom_field&params={"itemId":<long>,
				     				 "id":<long>,		
				     				 "callMode":"<text>"
				     				 "n":"<text>",
				     				 "v":"<text>"}

Parameters

NameParameter
itemIdItem ID.
idCustom field ID. It is not taken into account during the creation, the custom field IDs are generated by the system.
callMode

Action:

  • create; 
  • update; 
  • delete.

The following parameters are only required to create and update custom fields:

NameParameter
nCustom field name.
vCustom field value.

Returned result

When creating or updating custom fields, the returned result is as follows:

Copied!
[
	<long>,		/* custom field ID */
	{
		"id":<long>,	/* custom field ID */
		"n":"<text>",	/* name */
		"v":"<text>"	/* value */
	}
]

When deleting custom fields, the returned result is as follows:

Copied!
[
	<long>,		/* custom field ID */
	null
]

Possible error codes:

CodeDescription
7

Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_VIEW_CFIELDS, ADF_ACL_ITEM_EDIT_CFIELDS).

6Undefined error.
4Wrong input parameters.
Download PDF file
Download Word document

See also