The problem seems to be the @function that is composing the form which could only be one line ie:
@command([Compose];"Contact")
fails with the error.
If you have a user that this happens to every so often and you cannto initially recreate it try in a different view, may be a view that is restricted to a subset of forms.
The error is because the view does not show the Composed form.
One solution is to change the view selection formula, but here is another solution:
This code temporarily opens up the AllDocsByUnid view, you need to create this view, it is basically SELECT @ALL and has first column sorted and
a formula equal to:
@text(@documentuniqueid)
So the Compose Form action button then is:
r:=@Text(@DocumentUniqueID);
db:="CN=Server1/O=Notes":"db.nsf";
@Command( [FileOpenDatabase]; db "AllDocsByUNID" ; r; "1" );
@Command([Compose];"Contact");
@Command( [FileOpenDatabase]; db "AllDocsByUNID" ; "" ; "0");
@Command([FileCloseWindow])
This code opens up the view to the current document, useful for inherited @Compose forms and then composes the form and then closes the view.
There is no flicker of the view.
NB It might be worth hard coding the database name and server instead of using "" as it seemed to fail with one user who used bookmarks.
Using @dbname did not work.
Here is the lotusscript version of the code:
Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Set uidoc=uiw.currentdocument
Dim db As notesdatabase
Set db = uiw.GetCurrentDatabase.database
Call uiw.OpenDatabase( db.server,db.filepath, "AllDocsByUNID", Cstr(uidoc.document.universalid), True )
Call uiw.ComposeDocument(db.server,db.filepath, "CoP")
Call uiw.OpenDatabase(db.server,db.filepath, "AllDocsByUNID", Cstr(uidoc.document.universalid), False )
Call uiw.currentview.close()
Hope that helps!