Update a custom field

distru-update-custom-fieldWrite

Renames a custom field, or changes its description, whether it's required, or its dropdown or checkbox options.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idstringYesCustom field to update. Resolve via distru-search-custom-fields.
namestringNoUp to 70 characters.
descriptionstringNoUp to 100 characters.
requiredbooleanNoMust be filled in on every record.
optionsobject[]NoDROPDOWN and CHECKBOX only: full option list after the update. Current options left out are deleted and removed from every record. Unchanged when omitted.
options[].namestringYesNo commas.
options[].previousNamestringNoCurrent name, when renaming; records using it switch to the new name.
options[].disabledbooleanNoStays on records that have it but can no longer be picked. Unchanged when omitted; new options enabled.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
customFieldobjectAlways
customField.idstringAlways
customField.namestringAlways
customField.descriptionstringCan be null
customField.entityTypeenum
ASSEMBLYBATCHCOMPANYCONTACTINVOICEPACKAGEPRODUCTPURCHASE_ORDERRETURNSALES_ORDERSTOCK_TRANSFERTASK
Can be null
customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
customField.requiredbooleanAlways
customField.optionsobject[]Always
customField.options[].namestringAlways
customField.options[].disabledbooleanAlways
What the AI reads

Renames a custom field, or changes its description, whether it's required, or its dropdown or checkbox options. It changes the field's definition, not record values, except that records using a renamed or removed option are updated to match. Its entity type and field type can't be changed; to change them, create a new field with distru-create-custom-field. Requires the custom fields settings permission. Sparse update: only the fields passed change; the rest stay as they are.