Solved

Problem with carry forward

Posted on 2004-09-08
4
208 Views
Last Modified: 2013-12-18
Thought I had this figured out but when the user clicks the submit button it is not closing and saving the doc. How can I have it close and save and open the new doc. It ended up behind a second doc. The user then gets prompted to save and may get confused.

Also, this is a simple thing but I don't use script that much. How can I do a SetField in script. I need a status field to update to submitted when they click the Save and complete next button.

Sub Click(Source As Button)
      Dim sess As New NotesSession
      Dim ws As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim uidoc As NotesUIDocument
      
      Dim doc, newdoc As NotesDocument
      
      Set uidoc=ws.CurrentDocument
      Set db = sess.CurrentDatabase
      Set doc= uidoc.Document
      
      
      Set newdoc = db.CreateDocument
      
      newdoc.Form = "ibpc_order_form"
      newdoc.contact = doc.contact
      newdoc.zone = doc.zone
      newdoc.address = doc.address
      newdoc.address2 = doc.address2
      newdoc.city = doc.city
      newdoc.state = doc.state
      newdoc.zip = doc.zip
      newdoc.phone = doc.phone
      newdoc.ccc = doc.ccc
      
      Call newdoc.save(True, False)
      
      ws.EditDocument True, newdoc
End Sub
0
Comment
Question by:jforget1
  • 2
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12010366
before ws.editdocument command

paste this

uidoc.save
uidoc.close

~Hemanth
0
 

Author Comment

by:jforget1
ID: 12010387
How do I do a set field in code, I just cannot think of the code.
0
 
LVL 14

Accepted Solution

by:
p_partha earned 125 total points
ID: 12010389
To set somefield in your code just use

Set uidoc=ws.CurrentDocument
uidoc.fieldsettext("<fieldname>","value")

or
set doc =uidoc.document
doc.<fieldname> = "value"

Do a uidoc.close and then do the ws.editdocument true,newdoc

Partha
0
 

Author Comment

by:jforget1
ID: 12010470
Thanks both of you, I should have split this as you both helped, I did not realize until it was to late that the responses were from 2 people.
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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

713 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