Skip to main content
When actions modify data that users are viewing, Forest automatically reloads the current page. However, Related Data sections in Summary Views require explicit invalidation to refresh.

When to use invalidation

Use related data invalidation when your action:
  • Creates, updates, or deletes records in a related collection
  • Modifies data displayed in Related Data sections of Summary Views
  • Changes relationships between records
Forest handles most cases automatically, but Summary Views with Related Data sections need manual refresh to avoid displaying stale data.

Basic usage

Add an invalidated array to your success result specifying which relationships to refresh:

Multiple relationships

Invalidate multiple Related Data sections at once:

Example: Add comment

Example: Update order items

Example: Assign task

With HTML result

Combine invalidation with HTML content:

With error result

Invalidation works with success results only. Errors don’t refresh data:

Finding relationship names

The relationship name in invalidated must match the field name in your schema:
  1. Open the Summary View in Layout Editor
  2. Find the Related Data section you want to refresh
  3. Note the relationship field name (e.g., emitted_transactions, comments, order_items)
  4. Use that exact name in the invalidated array

Limitations

  • Invalidation only works with success() result type
  • Only affects Summary Views with Related Data sections
  • Cannot invalidate data in other collections
  • Requires exact match of relationship field names

Alternative: Full page reload

If you need to refresh all data on the page, redirect to the current page:
However, this is less efficient than targeted invalidation.