appSetCustomFieldArchived
Requires at least one of the permissions customers:customer:read, payments:collection:read, products:product:read, purchase:debit_note:read, purchase:grn:read, purchase:payment:read, purchase:purchase_invoice:read, purchase:purchase_order:read, sales:credit_note:read, sales:quote:read, sales:sales_invoice:read, sales:sales_order:read, sales:shipment:read or suppliers:supplier:read.
Archive or restore one of the calling app's own custom fields. Needs write_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 AppSetCustomFieldArchived($archived: Boolean!, $id: ID!) {
appSetCustomFieldArchived(archived: $archived, id: $id) {
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": "mutation AppSetCustomFieldArchived($archived: Boolean!, $id: ID!) {\n appSetCustomFieldArchived(archived: $archived, id: $id) {\n id\n type\n appAccess\n archived\n carryForward\n defaultValue\n }\n}",
"variables": {
"archived": true,
"id": "id"
}
}
EOF
Variables:
{
"archived": true,
"id": "id"
}
Response:
{
"data": {
"appSetCustomFieldArchived": {
"id": "id",
"type": "string",
"appAccess": "string",
"archived": true,
"carryForward": true,
"defaultValue": {}
}
}
}
appSetCustomFieldArchived(
archived: Boolean!
id: ID!
): CustomFieldDefinition!
Arguments
appSetCustomFieldArchived.archived ● Boolean! non-null scalar
True to archive, false to restore.
appSetCustomFieldArchived.id ● ID! non-null scalar
The app's field.
Type
CustomFieldDefinition object
A field the organization added to one kind of record.