update_custom_field
The update_custom_field function is used to create, update, or delete custom fields.
svc=item/update_custom_field¶ms={"itemId":<long>,
"id":<long>,
"callMode":"<text>"
"n":"<text>",
"v":"<text>"}
Parameters
Name | Parameter |
---|---|
itemId | Item ID. |
id | Custom field ID. It is not taken into account during the creation, the custom field IDs are generated by the system. |
callMode | Action:
|
The following parameters are only required to create and update custom fields:
Name | Parameter |
---|---|
n | Custom field name. |
v | Custom field value. |
Returned result
When creating or updating custom fields, the returned result is as follows:
[
<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:
[
<long>, /* custom field ID */
null
]
Possible error codes:
Code | Description |
---|---|
7 | Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_VIEW_CFIELDS, ADF_ACL_ITEM_EDIT_CFIELDS). |
6 | Undefined error. |
4 | Wrong input parameters. |