How to open docB thru a button on the action bar inside docA on web?

I need to open docB through clicking an action button inside docA, but I discover that I can’t use command Forumula @OpenDocument as it only works when get executed on the view panel.

So I have to use Lotus Script as below:

Sub Click(Source As Button)

Dim ws As New notesuiworkspace

Dim db As notesdatabase

Set db = ws.CurrentDatabase.database

Dim uidoc As notesuidocument

Set uidoc=ws.currentdocument

Dim pdoc As notesdocument

Set pdoc= db.getdocumentbyunid(“A4C906A2D5999071482573D100283ECA”)

Call uidoc.Close(True)

Call ws.Editdocument(False, pdoc)

End Sub

Question is above codes can only work on Notes Client,

any method to work out on web?

Subject: How to open docB thru a button on the action bar inside docA on web?

do it with javascript on the web. so change the action run combos to “web” and “JavaScript”. Code would be something like:

var ri = document.forms[0].ri.value;

var unid = document.forms[0].unid.value;

location.href=“/” + ri + “/0/” + unid + “?OpenDocument”;

you can pick up ri and unid from fields on your form, do it like this:

Then compute the ri and unid values in the computed text formula:

ri would be @replacesubstring(@replicaid; “:”; “”);

unid is dependant on your app

Subject: RE: How to open docB thru a button on the action bar inside docA on web?

It work, thanks Gwyn.