f365.control, non-field components
ControlHandle for buttons, headers, linkedLists, anything that isn't a value-bearing field but participates in the form.
f365.control(id) returns a ControlHandle for any non-field component, buttons, headers, callouts, linkedLists, anything that has adata-f365-internal-name but
isn't backed by a SharePoint column.
Properties & methods
| Property | Description |
|---|---|
visible / enabled | Toggle UI state. |
label | Override the displayed label (buttons, headers). |
on(event, handler) | Subscribe to component-specific events. "click" for buttons; "ai-complete" for AI button; etc. |
asLinkedList() | Type-narrowed accessor. Returns null unless the underlying control is a LinkedList. |
Examples
Hide a button until prerequisites met
f365.events.onChange('AgreedToTerms', (v) => {
f365.control('SubmitBtn').enabled = v === true;
});
LinkedList: add a row programmatically
f365.control('LineItems').asLinkedList()?.addRow({
Sku: 'WIDGET-001',
Quantity: 1,
UnitPrice: 25.0,
});
Related
Related articles
- f365.field, accessing form fields
Read and write field values, toggle visibility/enabled/required, listen for events, focus, blur, validate.
- LinkedList field
Edit child-list rows inline on the parent form, repeatable mini-grids backed by a related SharePoint list.
- Button (custom action)
A click-triggered button that runs JavaScript, navigates, triggers a Power Automate flow, or shows a dialog, outside the standard Submit and Cancel flow.