cancel
Showing results for 
Search instead for 
Did you mean: 

Update UI field for 'LastChangedAt' after save

sastremarti
Discoverer
0 Kudos
162

Hi people,

I am facing an issue I hope you'll be able to find me with. Let me explain in briefly:

I have implemented a "LastChangedAt" (timestamp) field in my UI that gets updated correctly whenever I do a change in any other field. For that purpose I use the annotation @Semantics.systemDateTime.lastChangedAt: true in my root entity.

The main problem is that the "LastChangedAt" value does not get refreshed automatically in the UI after saving, so I have to do that manually: either refreshing the browser or going back and forth.

There is one thing that works (...the usage of "side effect { field MyField affects Targets }") but I would like not to go with that option as it forces me to specify all the source fields that could be changed and so specify them one by one.

Is there any other thing I can do?

Many thanks in advance!

View Entire Topic
AbhishekSharma
Active Contributor
0 Kudos

Hi @sastremarti another option you may try to fill CREATE method's mapped parameter with your Key fields and lastChangedAt field.

Hope this helps...

Thanks-

sastremarti
Discoverer
0 Kudos
thanks mate...will give it a try! 🙂