Solved

Script Question

Posted on 2003-11-28
4
261 Views
Last Modified: 2013-12-18
Hello

why does the following code place the response document if the parent document is new with the document below the correct document and when it is old (or been created prior) it places the response document in the correct place??

ValidityCheck = Doc.Validity(0)
      If (Validity <> ValidityCheck) And (ValidityCheck = "Invalid") Then
            Dim Values() As String
            Dim LineCount As Integer
            Set View = Db.GetView("(Text Lookup)")
            View.Refresh
            Set Nav = View.CreateViewNav()
            Set Entry = Nav.GetFirst
            LineCount = -1
            Do While Not(Entry Is Nothing)
                  LineCount = LineCount + 1
                  Redim Preserve Values(LineCount)
                  Values(LineCount) = Entry.ColumnValues(0)
                  Set Entry = Nav.GetNext(Entry)
            Loop
            LetterType = Ws.Prompt(PROMPT_OKCANCELLIST, "Select Letter Type", "Select the type of letter you wish to create", "", Values)
            If LetterType = "" Then Exit Sub
            Dim ProfileDoc As NotesDocument
            Set ProfileDoc = Db.GetProfileDocument("ProfileForm", Ses.UserName)
            ProfileDoc.DocumentType = LetterType
            ProfileDoc.Save True, False
            Ws.ComposeDocument "", "", "Letter"
      End If
0
Comment
Question by:DavidAbbott
  • 3
4 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9837040
David,

That is the natural behaviour of Lotus Domino. Your current document must be a valid back-end document before you can create a response document on it. If you try creating a resposnse document for an in-memory (a front-end) docuemnt, it will never be associated correctly.

0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 500 total points
ID: 9837050
Try saving the current front-end docuemnt (represented by UIDoc) and retrieve the corresponding NoteID for this document. Then pass this NoteID as the forst argument to WS.ComposeDocument
0
 

Author Comment

by:DavidAbbott
ID: 9837107
Thanks for the help
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9837117
Oh my pleasure David!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DAOS - Backup / Restore 2 200
All incoming messages are coming as read 3 53
DNS error assumed 8 85
xss alert in domino url 9 55
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question