Ralf Behle commented on Jul 12, 2010

Pitfall on NotesUiDocument vs. NotesDocument field changes - unexpected "Reload"

Thanks for this hint. I was not aware about that problem.

But the reason is not an unexpected reload. The realod is higly expected. Every time you change any field in the backend document the frontend is fully reloaded, will say the form on the screen is updated with backend contend; no matter if the backend change would affect visible fields or not.

As far as I know there are no existing events in case of reaload.

You can switch off realod by setting

uidoc.AutoReload = false.

By the way this is a good idea to save performance when changing many fields in the backend, because every single change triggers a fully reload.

2 possibilities to avoid the described problem

a) FIRST write to backend - Frontend changes are written to backend on next uidoc.Save()

b) switch off AutoReload - BUT be aware that changes on backend fields with corresponding frontend field are lost on next uidoc.Save()