Solved

Creating Response Document Using LotusScript

Posted on 2003-11-13
7
1,071 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to access Names.nsf DB from a C# application 14 1,429
Lotus Notes 6.5.5 6 200
Lotus Domino server 11 55
Installing Lotus Notes on Citrix XenApp 3 85
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

21 Experts available now in Live!

Get 1:1 Help Now