Record watcher in UI Builder - reload page once state changes?

miro2
Mega Sage

Hi,

I want to refresh the HR Case form on the HR Agent workspace whenever state value changes. When the flow runs and conditions are met, the flow updates the state, but the UI action buttons presented on the form remain from the previous state. Therefore, I need to reload the page to see the current buttons.
I added a Data resource called "Record producer" in the UI builder for the HR Case table with a condition. On the "Message received" event, I added the event handler "Reload - Data resource glide form".

 

The flow runs and changes state, but the UI actions are still showing from the previous state.

This might be misleading since the "Suspend" button is still visible.

 

miro2_3-1709806863378.png

 

After manually reloading the form, we see the correct buttons with "Resume".
This is what I expect after record watcher will be triggered.

miro2_4-1709807019828.png

 

Configuration:

miro2_0-1709806619511.png

miro2_2-1709806649164.png


miro2_1-1709806631906.png

 

 

My assumption is that once the state changes, the HR Case form reloads. However, nothing happens. I'm not sure how to trigger it properly.
My first approach was to use Glide Modal and display an alert, and then a client script reloads the page (and this works). But I want to try if Record Watcher does the same.

Has anyone implemented Record Watcher in UI Builder? If so, your advice would be helpful.
I already checked this AMB Record Watcher Data Resource and I tried add some logs but with no luck.

 

3 REPLIES 3

miro2
Mega Sage

Has anyone implemented a similar solution or worked with record watchers in UI Builder?

ParveenK
Tera Contributor

@miro2  were you able to refresh the page when the state changed? I am doing something similar and was curious to know.

 

Hi @ParveenK 
Unfortunately, I haven't found any solution using Record Watcher. Instead, I did it using an onChange client script to reload the workspace page without reloading the entire browser tab. Additionally you can add popup to inform the user that the page will be reloaded, allowing them to click "OK" and be aware of the action (though this is optional).