Skip to main content

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:

mutation AppSetCustomFieldArchived($archived: Boolean!, $id: ID!) {
appSetCustomFieldArchived(archived: $archived, id: $id) {
id
type
appAccess
archived
carryForward
defaultValue
}
}

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.