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