# flexipage:fieldSection — Field Section ## Purpose Displays fields in a column layout under a labeled section heading. ## Supported Page Types - RecordPage (`main` region or detail tab facets) ## Structure Three-level nesting: 1. Template Region (Region type) — contains the fieldSection component 2. Column Facets (Facet type) — contains `flexipage:column` components pointing to field facets 3. Field Facets (Facet type) — contains `fieldInstance` elements for each column **Critical:** The `columns` property value must match the `` of the facet where the `flexipage:column` components are defined. It is *not* a number. ## Property Table | Property | Type | Required | Default | Description | |----------|------|----------|---------|-------------| | columns | String (Facet ref) | Yes | — | Reference to the Facet containing `flexipage:column` components | | label | String | Yes | — | Section heading displayed to users | | horizontalAlignment | Boolean | No | false | Align fields horizontally within columns | ## Property Inference Rules | User Intent | Inferred Properties | |-------------|-------------------| | "add a field section with {fields}" | Split fields evenly across 2 columns | | "section labeled {name}" | `label` = `{name}` | ## XML Example ```xml uiBehavior required Record.Field0 RecordColumn1Field0 uiBehavior none Record.Field1 RecordColumn1Field1 Facet-FieldSection-Column1 Facet uiBehavior none Record.Field2 RecordColumn2Field0 uiBehavior none Record.Type RecordColumn2Field1 Facet-FieldSection-Column2 Facet body Facet-FieldSection-Column1 flexipage:column flexipage_column1 body Facet-FieldSection-Column2 flexipage:column flexipage_column2 Facet-FieldSection-Columns Facet columns Facet-FieldSection-Columns horizontalAlignment false label Information flexipage:fieldSection flexipage_fieldSection main Region ``` ## uiBehavior Attribute Every `fieldInstance` requires a `uiBehavior` property that controls field editability on the page. | Value | Meaning | When to use | |-------|---------|-------------| | `none` | Field respects standard editability settings (default) | Standard fields — uses object/layout-level permissions | | `required` | Field is required — must be filled before save | Fields that must have a value for the record to be valid | | `readonly` | Field is read-only — displayed but not editable | Formula fields, system fields, or fields locked by business rules | **Inference rules:** - Default to `none` unless the user specifies otherwise - If user says "required" or "mandatory" → use `required` - If user says "read-only", "display only", or "locked" → use `readonly` - Formula fields and auto-number fields should always be `readonly` ## Edge Cases - `columns` property is a Facet name, not a count — common mistake - Split fields roughly evenly across columns - Identifiers: `flexipage_fieldSection`, `flexipage_fieldSection2`; columns: `flexipage_column1`, `flexipage_column2` - Second fieldSection on same page: all facet names and identifiers must be unique