Hi,
i need to reload a UiDocument while changing from read to editmode to get changes in the backend, made there by other documents.
I tried a lot…
I tried to solve it in querymodechange:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim ws As New notesuiworkspace
Dim ses As New notessession
Dim db As notesdatabase
Dim doc As Notesdocument
Dim doc_reopened As NotesDocument
Dim UNID As String
Set db = ses.CurrentDatabase
Set doc = Source.Document
UNID = doc.UniversalID
Messagebox UNID
Source.Close(Immediate)
Set doc_reopened = db.GetDocumentByUNID(UNID)
Set Source = ws.EditDocument(True,doc_reopened,False)
End Sub
The document is opened new, but the Changes are not visible until i close and open the document from the frontend.
I tried it with formula in a action:
REM {Nur, wenn Dokument nicht neu.};
@If (@IsNewDoc ; @Prompt([Ok];“process Canceled”;“This function is only available for old Documents”) + @Return(“”) ; @Success);
_ID := @Text(@DocumentUniqueID);
@Command([FileCloseWindow]);
@PostedCommand([OpenDocument] ; “1” ; _ID; “”; “”)
This works, but only if there is no change in the Backend, with a change there, i get an errormessage " Angegebener Befehl kann nicht ausgeführt werden".
Now i think maybe its impossible ?
Thanks for any help,
Elke