How to access the db from emedded view from another db using LS

Lotus Script gurus,

i need using a script in view action button, in a view in database A, that is embedded in a form in database B, to retrieve NotesDatabase object of this B database

i.e. when i open database B and open any document that will display embedded view from database A and then i click a view action from this embedded view (db A), i need a reference to database B.

does anyone have any idea how to do it using LS and without setting any info in notes.ini on document from db B open?

thanks

Subject: Couldn’t you just use…

…some code which interrogates the current workspace object?

Something like…

Dim ws As New NotesUIWorkspace

Dim thisDb As NotesDatabase

Dim thisDoc As NotesDocument

Set thisDoc = ws.CurrentDocument.Document

Set thisDb = thisDoc.ParentDatabase

… You can then access whatever you need in the “thisDb” object.

Hope that helps!

T.

Subject: RE: Couldn’t you just use…

thanks

it is my mistake i didnt tell i tried it but

Set thisDoc = ws.CurrentDocument is nothing

because current database is the db that contains the view and you do not have open UI doc there. this is the problem here