Open View Problem

Hi,

I have got one application which is developed in .net technology. In this application we have got a screen for adding evidence against a subsystem and this evidence can be of any type.

Here lotus notes documents are of one evidence type and lotus notes documents are of any type, say it can be View Link,Doc Link and DB Link. Normally how users are doing is they will select one document(mail) and after that Edit menu + copy as Link and select any link type say View Link,Doc Link and DB Link. Once they attached the lotus notes evidenece we are giving options for user to open the attached lotus notes links. For opening the lotus notes view link, we are using the below mentioned programming. But while opening I am getting the following error message.

public function openLotusView(serverid,dbfile,viewName)

msgbox viewName

on error resume next

Dim strError

Set ws = CreateObject("Notes.NotesUIWorkspace")

if err.number > 0 then

	strError=err.Description

	openLotusView=strError

	err.Clear

	exit function

end if		

Call ws.OpenDatabase( serverid, dbfile, "","", False,True )

if err.number > 0 then

	strError=err.Description

	openLotusView=strError

	err.Clear

	exit function

end if		



if viewName <> "NA" then

	set mydb=ws.CurrentDatabase

	call mydb.openview( viewName )

	msgbox viewName

end if

if err.number > 0 then

	strError=err.Description

	openLotusView=strError

	err.Clear

	exit function

end if    

end function

Error Message:View or Navigator “<>” does not exist. Here <> will be replaced with the corresponding view name.

Can you please let me know why I am getting this error message and tell me a solution for this.

Thanking you.

Girish Kumar.V

Subject: Open View Problem

Have you debugged this? Do you know which line is causing the error?

The Notes 6 Designer Help for the CurrentDatabase property of the NotesUIWorkspace states:

“The GetCurrentDatabase method supersedes this property due to the failure of the property when the user accesses the current database through View - GoTo (for example, on the workspace menu with the database selected).”

Perhaps try that method instead.

Subject: RE: Open View Problem

“Open View” method is causing the error. I tried with the method that you mentioned, but still I am getting the same error.

My intention is to open the particular view that the user is passed from the corresponding database. Before open the view I created workspce object, then I open the current database using ws.currentdatabse method. While opening I was getting that error. Please suggest me a good method for opening a view.

Thanks

Girish Kumar.V