CustomFieldDefinition
A field the organization added to one kind of record.
type CustomFieldDefinition {
archived: Boolean!
carryForward: Boolean!
defaultValue: JSON
editPermission: String
entity: String!
group: String
helpText: JSON
id: ID!
key: String!
labels: JSON!
options: JSON
placements: [String!]!
required: Boolean!
requiredWhen: JSON
rules: JSON
showWhen: JSON
sortOrder: Int!
type: String!
viewPermission: String
visibility: String!
}
Fields
CustomFieldDefinition.archived ● Boolean! non-null scalar
True when archived: hidden from forms, stored values kept and still readable by staff.
CustomFieldDefinition.carryForward ● Boolean! non-null scalar
Whether the value travels to the next document (quote to order to invoice) when that document has the same field.
CustomFieldDefinition.defaultValue ● JSON scalar
The value a new record starts with, or null.
CustomFieldDefinition.editPermission ● String scalar
The permission a staff user needs to change the value, or null.
CustomFieldDefinition.entity ● String! non-null scalar
The kind of record the field belongs to, e.g. customer, address or sales_order_line.
CustomFieldDefinition.group ● String scalar
The heading the field is grouped under on forms, or null.
CustomFieldDefinition.helpText ● JSON scalar
Help text per language, or null.
CustomFieldDefinition.id ● ID! non-null scalar
The custom field's id.
CustomFieldDefinition.key ● String! non-null scalar
The stored key; values are kept under it and it never changes.
CustomFieldDefinition.labels ● JSON! non-null scalar
The field's name per language, as the organization wrote it: { [locale]: text }.
CustomFieldDefinition.options ● JSON scalar
For select fields: the choices, each { value, labels, archived? }. Null for other types.
CustomFieldDefinition.placements ● [String!]! non-null scalar
Where the field appears: forms, documents, labels, lists and exports.
CustomFieldDefinition.required ● Boolean! non-null scalar
Whether a form that shows the field refuses to save without a value.
CustomFieldDefinition.requiredWhen ● JSON scalar
Require the field only when another field holds one of the listed values: { field, in }. Null: no condition.
CustomFieldDefinition.rules ● JSON scalar
Length, range, decimal-place or item-count limits, or null.
CustomFieldDefinition.showWhen ● JSON scalar
Show the field only when another field holds one of the listed values: { field, in }. Null: always shown.
CustomFieldDefinition.sortOrder ● Int! non-null scalar
Order among the record's fields; lower comes first.
CustomFieldDefinition.type ● String! non-null scalar
text, textarea, number, boolean, date, select, multiselect, phone, email or url.
CustomFieldDefinition.viewPermission ● String scalar
The permission a staff user needs to see the value, or null when every staff user may.
CustomFieldDefinition.visibility ● String! non-null scalar
staff (staff only), buyer_visible (buyers can see it) or buyer_editable (buyers can fill it in).
Returned By
customerCustomFieldDefinitions query ● customerSignupCustomFieldDefinitions query ● customFieldDefinitions query ● mobileSignupCustomFieldDefinitions query ● saveCustomField mutation ● setCustomFieldArchived mutation