This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 4, 2012, 3:00 PM
31 Posts
topic has been resolvedResolved

Missing value in mail

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role:
  • Tags:
  • Replies: 1
Have a dialog box with a field and a button. The field (inputText1) is an Edit Box only want the field to write in and do not save the data.
 
When you press the button, I want an email will be sent with the content from the field.
 
When my mail arrives there is no value. 
 
See my code:
 
 db1 = session.getDatabase("server/company","Develop\\Info.nsf")
doc1 = db1.createDocument()
doc1.appendItemValue("Form","Memo")
var1 = "Link ==>"
var2 = "Info!"
varBodyTXT = "Text......:";

var3 = "<b>" + varBodyTXT + "</b><br>" + document1.getItemValueString("inputText1") + "<br><br><a href='./xpages/Info.nsf/information.xsp?documentId=" + document1.getDocument().getUniversalID()+"&action=openDocument'>" +var1+ "</a>"

body = doc1.createMIMEEntity()
subject = body.createHeader("Subject")
subject.setHeaderVal(var2)

stream = session.createStream()
stream.writeText(var3)

body.setContentFromText(stream, "text/html; charset=iso-8859-1", 0)
tmpMail = getComponent("author1").getValue();
doc1.send(tmpMail)
sessionScope.tabPanels ="tabPanel1";
document1.setValue("Status","OK");
//Save functions
document1.save();
//ReDirect to page

context.redirectToPage("wDocumentXPages")
 
Regards
Fredrik
Jan 4, 2012, 3:11 PM
31 Posts
Re: Missing value in mail
sorry, sometimes you become blind to your own code.
 
getComponent("inputText1").getValue();

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal