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:
- GraphQL
- cURL
mutation SetCustomFieldArchived($archived: Boolean!, $id: ID!) {
setCustomFieldArchived(archived: $archived, id: $id) {
id
type
archived
carryForward
defaultValue
editPermission
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetCustomFieldArchived($archived: Boolean!, $id: ID!) {\n setCustomFieldArchived(archived: $archived, id: $id) {\n id\n type\n archived\n carryForward\n defaultValue\n editPermission\n }\n}",
"variables": {
"archived": true,
"id": "id"
}
}
EOF
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.