Add the page layout filter table
Merged
EH
3d ago+1941+1941+0123456789012345678901234567890123456789-2-2-0123456789
Why
One dashboard date control can filter opportunities by close date and tasks by due date. The layout owns the control and its saved default. Each widget binding will choose the field that the control applies to.
Design
PageLayoutFilteris syncable metadata owned by a dashboard or standalone page layout. This first slice storesDATEfilters with a nullfieldMetadataIdand validates saved defaults using the existing date filter rules, includingIS_BETWEENfrom #31817.- Deleting a layout cascades to its filters. A date filter survives field deletion because it belongs to the layout.
- The flat layout cache stores
filterIds, and the filter map stores the records. Layout deletion invalidates the filter map. Field deletion no longer needs the special layout and filter cache invalidation.
Testing
- Passed 94 targeted unit tests.
- Verified on disposable PostgreSQL that a date filter can be saved without a source field, survives field deletion, and is removed when its layout is deleted.
Stack
| PR | What it does | Base |
|---|---|---|
| #32005 | Store layout-owned date filters | main |
| #32007 | Read and save filters through the layout API | #32005 |
| Follow-up | Bind filters to widget date fields | #32007 |
| Follow-up | Apply filters to widget queries and verify row-level permissions | Widget bindings |
| Follow-up | Add dashboard controls to create, link, and use filters | Query execution |
| Follow-up | Copy filters and remap bindings when duplicating a dashboard | Widget bindings |
| Follow-up | Define and test filter reset for app-owned layouts | Widget bindings |