Create custom field value
create_custom_field_valueCreate (upsert) a custom field value for an entity. The table stores values in typed columns - prefer setting the one that matches the field definition's field_type: value_text (text/select), value_number (number), value_date (date, ISO YYYY-MM-DD), value_boolean (boolean). Alternatively pass a single value string and the server will dispatch it to the right column based on field_type. Writes upsert on (entity_id, field_definition_id) so replaying a batch is idempotent. Requires custom_fields:write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Legacy single-value shim - server dispatches to the correct typed column based on the field definition's field_type. Ignored if any value_* typed column is set. | |
| entity_id | Yes | Entity ID - e.g. asset.id, work_order.id (required) | |
| value_date | No | Date value, ISO YYYY-MM-DD (use for field_type=date) | |
| value_text | No | Text value (use for field_type=text or select) | |
| value_number | No | Numeric value (use for field_type=number) | |
| value_boolean | No | Boolean value (use for field_type=boolean) | |
| field_definition_id | Yes | Custom field definition ID - resolve via list_custom_field_definitions (required) |