Solved

Script Question

Posted on 2003-11-28
4
259 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now