Solved

Script Question

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

13 Experts available now in Live!

Get 1:1 Help Now