Be seen. Boost your question’s priority for more expert views and faster solutions
Sub Exiting(Source As Field) Dim ss As New notessession Dim ws As New notesuiworkspace Dim uidoc As notesuidocument Dim db As notesdatabase Dim view As NotesView Dim curdoc As NotesDocument Dim doc As notesdocument Dim answer As Integer Dim CR As String Set db = ss.CurrentDatabase Set uidoc = ws.CurrentDocument Set curdoc = uidoc.Document Set view = db.GetView("DupCR") CR = uidoc.FieldGetText("Change_Request_No") Set doc = view.GetDocumentByKey(CR) If Not doc Is Nothing Then answer = Messagebox( "CR found. Switch to existing document?", 1+32, "CR exists: " & CR) If (answer = 1) Then curDoc.SaveOptions = "0" Call uidoc.Close Delete uidoc Call ws.EditDocument(True, doc) End If End If End Sub
Join the community of 500,000 technology professionals and ask your questions.