update_admin_field

The update_admin_field function is used to create, update, or delete admin fields.

Copied!
svc=item/update_admin_field&params={"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:
  • create;
  • update;
  • delete.

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:

Copied!
[
	<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:

Copied!
[
	<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.

If you find a mistake in the text, please select it and press Ctrl+Enter.