customFieldUsage
Requires permission settings:custom-fields:manage.
Counts the organization's records that hold a value for one custom field, so an admin knows whether it can be deleted. 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
query CustomFieldUsage($id: ID!) {
customFieldUsage(id: $id) {
id
recordCount
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomFieldUsage($id: ID!) {\n customFieldUsage(id: $id) {\n id\n recordCount\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"customFieldUsage": {
"id": "id",
"recordCount": 0
}
}
}
customFieldUsage(
id: ID!
): CustomFieldUsage!
Arguments
customFieldUsage.id ● ID! non-null scalar
The custom field.
Type
CustomFieldUsage object
How many records hold a value for a field.