Update a custom field definition
Changes parts of a custom field definition. Only the properties you send are written, so this is a genuine partial update. entityType cannot be changed.
Authorization
AuthorizationstringrequiredPath parameters
customFieldIdstringrequiredThe custom field definition to change. A Snowflake id sent as a decimal string.
Body
application/json
namestringNew label, 1 to 100 characters.
descriptionstringNew help text, up to 500 characters.
publicbooleanWhether tenants, owners and vendors see the value.
filterablebooleanWhether the field can be filtered on.
listablebooleanWhether the field can be shown as a list column.
orderintegerWhere the field sits among the others.
optionsobjectReplacement type and validation rules. Sending this replaces the whole options object, so include type and every rule you want to keep.
activebooleanSet to false to retire the field without deleting the values already stored against it.
Response
200 · The definition after the change.
idstringThe custom field definition. A Snowflake id sent as a decimal string.
entityTypeenum<string>What kind of record this field can be set on.
namestringLabel shown next to the input.
descriptionstringHelp text. Absent when none was set.
publicbooleanWhether tenants, owners and vendors can see the value in their own portals.
filterablebooleanWhether the field can be filtered on in lists and reports.
listablebooleanWhether the field can be shown as a column in lists.
orderintegerWhere the field sits among the others. Lower sorts first.
optionsobjectThe field's type and its validation rules.
activebooleanWhether the field is still in use. A deactivated field keeps its stored values.
createdstring · date-timeWhen the field was created, in the company's timezone.
updatedstring · date-timeWhen it was last changed, in the company's timezone.
401 · The access token is missing, expired, or not valid for this company.
404 · No custom field definition with that id exists in the caller's company.
options is not merged. Whatever you send becomes the whole rule set, so read the definition first and send back every rule you still want, including type.
Values already stored sit in the slot the old type used. Switching options.type does not move them, so a value written as stringValue stays there even after the field becomes a number.
options.type | Which value slot the field uses | Rules you can set |
|---|---|---|
string | stringValue, or stringArray when multiple is true | minLength, maxLength, values, rejectUnknown, multiline, multiple, default |
number | numberValue | min, max, step, default |
boolean | booleanValue | default |
datetime | dateTimeValue | min, max, default, dateOnly |
reference | referenceValue, or referenceArray when multiple is true | referenceEntityType, multiple |