Solved

Problem with carry forward

Posted on 2004-09-08
4
204 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

12 Experts available now in Live!

Get 1:1 Help Now