customFieldDefinitions
Requires an authenticated session.
Lists the organization's custom fields, optionally for one kind of record, archived ones included when asked. Staff forms render from it. Installed apps' own fields are left out unless asked for (Settings › Custom fields shows them read-only). Requires a signed-in staff user.
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 CustomFieldDefinitions {
customFieldDefinitions {
id
type
appAccess
archived
carryForward
defaultValue
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomFieldDefinitions {\n customFieldDefinitions {\n id\n type\n appAccess\n archived\n carryForward\n defaultValue\n }\n}"
}
EOF
Response:
{
"data": {
"customFieldDefinitions": [
{
"id": "id",
"type": "string",
"appAccess": "string",
"archived": true,
"carryForward": true,
"defaultValue": {}
}
]
}
}
customFieldDefinitions(
entity: String
includeApps: Boolean
includeArchived: Boolean
): [CustomFieldDefinition!]!
Arguments
customFieldDefinitions.entity ● String scalar
Only fields of this kind of record, e.g. address.
customFieldDefinitions.includeApps ● Boolean scalar
Also list installed apps' own fields (namespace app--<appId>), which only their app changes. Default false.
customFieldDefinitions.includeArchived ● Boolean scalar
Include archived fields. Default false.
Type
CustomFieldDefinition object
A field the organization added to one kind of record.