Subject: RE: Dialogbox in Browser
The reason why ask the question was because I had this little problem writing a browser compatible code. The problem is how do i do all the ‘looping’ code in Javascript, or can I put my existing code as agent and call it. But then again I can only call it through Client but not browser. Can anybody there give a some advice.
Cheers.
Here’s what i want to implement.
I have a Helpdesk application whereby the request is logged in the request form. Staff assigned to do the job log their action in a form called Action Taken Log (ATL). The request and action taken documents are tied by a unique Doc. I.D. If a staff has created an ATL, then open the existing one, otherwise create a new one.
(A button in the request form)
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim ws As New notesuiworkspace
Dim finddoc As notesdocument
Dim view As notesview
Dim user As String
user = session.CommonUserName
uidoc.EditMode = True
Set db = session.CurrentDatabase
'Go to 'Problem Logging Action Taken Lookup' view; Has the doc. been created ?
Set view = db.GetView( "PLATLookup" )
key$ = uidoc.fieldgettext("DocID") & "~" + user
Set finddoc = view.GetDocumentByKey(key$)
'If no ATL document is found then, create a new one
If finddoc Is Nothing Then
Call uidoc.FieldSetText("CreatedATL","Yes")
Call uidoc.save
Call ws.ComposeDocument( "", "", "ATL" )
Else
'if a document is found then open it. (i.e open finddoc)
Call ws.DialogBox("ATL", True, True, True, False, False, False, "Action Taken Log", finddoc, False, True)
'Call ws.DialogBox( form$ [, autoHorzFit [, autoVertFit [, noCancel [, noNewFields [, noFieldUpdate [, readOnly [, title$ [, notesDocument [, sizeToTable [, noOkCancel ]]]]]]]]]] )
End If
End Sub