Solved

Creating Response Document Using LotusScript

Posted on 2003-11-13
7
1,105 Views
Last Modified: 2013-12-18
I'm fairly new to notes and still getting used to the syntax.
So I need help with the following:

I have a form and a response form(they are identical).

I want a button on my parent form which when clicked creates a response
document with the parent documents values it and opens the the
parent document in edit mode.

This is what I want the code to look like:

Dim workspace As New NotesUIWorkspace
===============================================
This is where I need the code that creates the
child form sets its values and it
Note: Code here will only set up the values for the child document.
         A different button will actually save the response document.
         So some sort of Global variables need to be used
===============================================
Call workspace.EditDocument( True )
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument

Thanks.......
0
Comment
Question by:marefin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 9743471
Hi marefin,
> when clicked creates a response
> document with the parent documents values it and opens the the
> parent document in edit mode.

Your description seems like it has a piece missing.  What do you want to do with this response?  It sounds like you want to create the respnse in teh background but never show it, and then allow the user to edit the main.

Sounds like you might want to just use the built-in versioning feature.

Best regards,
qwaletee
0
 
LVL 5

Expert Comment

by:apparition
ID: 9743537
Actually what I'm trying to do is Have a button on the
Parent form that says "Create new version"
What this will do is allow the user to edit the document
but save the exhisting data in another document as a response.
So every time the user clicks on the button a new version is created
while the older one becomes a response.

I don't know much about built in version controlling, if doing it that
way accomplishes what I want to do the I all for it.

Please provide feedback.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9743548
Well Qwaletee has a point if you are intended to do something like that.

But if you are talking about two different forms then go for script.

Anyway Are you planning to copy all the fields into the child ?

Dim session as New NotesSession
dim db as NotesDatabase
dim child as NotesDocument

set note = uidoc.Document  ' uidoc should be set

set db = session.CurrentDatabase
set child = New NotesDocument(db)
call note.CopyAllItems( child, true )  ' If you are planning to do selective copy then do this child.Field1 = note.Field1
child.Form = "Child Form Name"

child.save true, false

~Hemanth

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 25 total points
ID: 9743561
Well then versioning is something that you might want to take a look at. Here is the help documentation describing how to enable versioning

http://www-12.lotus.com/ldd/doc/domino_notes/5.0/help5_designer.nsf/078c27b23262ffff852566dd0029426a/4248ab357568780f8525672f007a0dd9?OpenDocument
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 100 total points
ID: 9744158
apparition,
In FORM PROPERTIES, on the first tab, there is a "versioning" section.  You want the option "Prior versions becomes responses."  that's al yu have to do.  No second form, no buttons, nothing.  If anyone saves the document using a Notes client, Notes will, before saving the new version, copy the old version to a new response document.
0
 

Author Comment

by:marefin
ID: 9747954
guys,

I am using notes built in Version Control as you suggested but I'm running into one problem. If I chose to edit the document
it also saves it as a newer version. In my application theres to buttons one is "Create new version" and the other is "Edit".
The function of edit being ability to edit the document not save the prior version as a response, only clicking on create new version
will save prior version as response.

Any thoughts?
0
 

Author Comment

by:marefin
ID: 9748300
Got it I'm using
uidoc.SaveNewVersion
or
uidoc.SaveNew

Depending on which button is clicked

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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