Here is the classic old issue. I've a form with embedded view on it (Show single category is used as well). There is an action on a view that create a new documents (which should be displayed in that embedded view). These solutions most likely wont work
- ws.ViewRefresh will not help
- Refreshing NotesUIDocument may cause a Notes client to crash, so it is not a way to go as well.
Refresh view by simulating of pressing F9
While searching for an example I found it on my blog :-), so you can easily find it here: how to emulate F9 key and save some minutes.
Refresh view by changing focus to another fields
The idea is to have 2 fields (let's call them FieldA and fieldB). Once you need to refresh embedded view - set focus to fieldA and then change it to fieldB. You also need either add refresh logic on Exiting property of fieldA (I prefer it, as it will not cause the perfomance on a form) or enable Automatically Refresh fields.
Refresh embedded view using hidden formula
And here is code examples
Call ws.ViewRefresh
Call uidoc.RefreshHideFormulas
Call ws.ViewRefresh
Please have a look on these 2 articles that inspired me:
8 comments :
Thank You! Works great, I took the hide-when method, still a work-around but best possible solution I think.
That hide formula and refresh routine worked great! Many thanks.
Hide-when trick saved my day ! Thank you !
For those in 2018 using R9, a uidoc.Refresh works with no crash.
Hi, the refresh hide formulas work like a charm.
I have an embedded view with a multi-value category column.
Thanks from 2022 :)
Will this work for a form displayed on the web?
Hi Scott, I honestly do not know. The article was more about Notes Client.
Post a Comment