CustomField
Stored in the customfields collection. createdAt and updatedAt are maintained automatically.
Returned by GET /custom-field, POST /custom-field, GET /custom-field/:id, PUT /custom-field/:id, PUT /custom-field/modify.
Example
One real CustomField as returned by GET /custom-field, taken from the data array. Recorded from a live response, so the defaults, denormalised snapshots and populated fields are the actual ones:
{
"hide": false,
"name": "Full Name",
"_id": "contact.name",
"valueType": "string",
"fieldType": "text",
"required": false,
"placeholder": "Full Name",
"helpText": "Full name of the contact person.",
"formFields": true,
"operators": [
"is",
"is not",
"…and 2 more"
],
"section": {
"_id": "basicInformation",
"name": "Basic Information"
},
"examples": [
"John Doe",
"Jane Smith",
"…and 8 more"
],
"panel": "contact",
"order": 1,
"deletable": false,
"fieldId": "contact.name",
"key": "contact.name",
"sourceFieldId": "name",
"parent": [],
"clearOnChange": []
}
:::note Trimmed for reading A populated reference is shown by the fields that identify it rather than in full — it arrives as the entire referenced document. Long arrays are cut to the first two entries and marked, long strings are truncated, and any field that could carry a credential is dropped rather than masked. :::
Fields
| Field | Type | Notes |
|---|---|---|
name | string | required |
description | string | |
section | any | |
order | number | |
hide | boolean | default false |
onlyShowTable | boolean | default false |
panel | string | default contact · one of contact, lead, productService |
valueType | string | one of string, number, boolean, date, member, file, array, object and 1 more |
fieldType | string | required · one of text, number, textarea, select, multi-select, file, checkbox, date and 4 more |
required | boolean | default false |
placeholder | string | |
helper | string | |
defaultValue | any | |
options | object[] | default [] |
options.label | string | |
options.description | string | |
options.value | string | |
company | ObjectId -> Company | required |
uniqueFieldID | string | set once |
children | object[] | default [] |
children.name | string | |
children.description | string | |
children.fieldType | string | required · one of text, number, textarea, select, multi-select, file, checkbox, date and 4 more |
children.required | boolean | default false |
children.placeholder | string | |
children.helper | string | |
children.defaultValue | any | |
children.valueType | string | required · one of string, number, boolean, date, member, file, array, object and 1 more |
children.options | object[] | default [] |
children.options.label | string | |
children.options.description | string | |
children.options.value | string | |
children.children | object[] | default [] |
children._id | ObjectId | |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
_id | ObjectId | |
createdAt | date | set once |
updatedAt | date |