Data refresh
This is the official documentation of Forest Admin Cloud.
Upon completing an action, your data will refresh automatically to keep it up-to-date if any changes have been made.
There is an exception to this rule, which is the related data displayed in the Summary View of a single record. In this situation, in order to prevent outdated data from being displayed, you may need to specify which data needs to be refreshed.
To do this, simply pass the invalidated
option to the success()
function, which includes an array of relationship names to indicate which ones have been altered.
Example
In the example below, let's consider a scenario where we are working on a Company
record that has several related emitted_transactions
. Upon completing the action, we send a success notification message stating "New transaction emitted," and we trigger a UI refresh to update the emitted_transactions
related data.
Last updated