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

NameDescription
itemIdItem ID.
idAdmin 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:

NameDescription
nAdmin field name.
vAdmin 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:

CodeDescription
7

Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_VIEW_AFIELDS, ADF_ACL_ITEM_EDIT_AFIELDS).

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

See also