Skip to main content

setCustomFieldArchived

Requires permission settings:custom-fields:manage.

Archives a custom field (hidden from forms, stored values kept) or restores it. A field other fields' conditions depend on, or that an enabled approval rule tests, is refused, naming them. Requires permission to manage custom fields.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation SetCustomFieldArchived($archived: Boolean!, $id: ID!) {
setCustomFieldArchived(archived: $archived, id: $id) {
id
type
archived
carryForward
defaultValue
editPermission
}
}

Variables:

{
"archived": true,
"id": "id"
}

Response:

{
"data": {
"setCustomFieldArchived": {
"id": "id",
"type": "string",
"archived": true,
"carryForward": true,
"defaultValue": {},
"editPermission": "string"
}
}
}
setCustomFieldArchived(
archived: Boolean!
id: ID!
): CustomFieldDefinition!

Arguments​

setCustomFieldArchived.archived ● Boolean! non-null scalar​

True to archive, false to restore.

setCustomFieldArchived.id ● ID! non-null scalar​

The custom field.

Type​

CustomFieldDefinition object​

A field the organization added to one kind of record.