Hi everyone,
Performing an action via an action button, like adding or editing a record, will refresh the block where the action button is located.
However, imagine a scenario where you run an automation on the base and have a conditional filter on the block. In this case, your use case may require some delay to ensure the automation is completed, and the record meets the condition for the block.
For this purpose, you can use the following custom code. Add the code in Page Settings > Custom Code > Header section. The delay time can be adjusted accordingly. Also, make sure to replace list1
in the code with your specific Block ID.
<script>
window.addEventListener("update-record-success-list1", () => { // make sure to use the correct hrid of the block
setTimeout(() => {
window.dispatchEvent(new CustomEvent("reload-block-list1"));
}, 1000); // replace this with appropriate timeout to account for automation
});
</script>