I'm trying to pre-populate the email "Introduction" field with text but keep getting an error - Object doesn't support this property or method" Below is the code I'm using. Any help would be great!!! Thanks, much!
function XDocument::OnSubmitRequest(eventObj)
var intro = XDocument.DOM.selectSingleNode("/my:myFields/my:FormInfo/my:FormIntro").text;
oEnvelope.Introduction = intro;
*****Below is complete function for reference******
function XDocument::OnSubmitRequest(eventObj)
{
// If the submit operation is successful, set
// eventObj.ReturnStatus = true;
// Write your code here
// var xmlTitle = XDocument.DOM.selectSingleNode("/iss:issue/iss:title");
var send_email = XDocument.DOM.selectSingleNode("/my:myFields/my:FormInfo/my:FormEmail").text;
var submitter_email = XDocument.DOM.selectSingleNode("/my:myFields/my:Email").text;
var intro = XDocument.DOM.selectSingleNode("/my:myFields/my:FormInfo/my:FormIntro").text;
// var vp_email = XDocument.DOM.selectSingleNode("/my:myFields/my:VPemail").text;
var subj = XDocument.DOM.selectSingleNode("/my:myFields/my:FormInfo/my:FormSubject").text;
try
{
var oEnvelope = XDocument.View.Window.MailEnvelope;
oEnvelope.To = send_email;
//oEnvelope.CC = XDocument.DOM.selectSingleNode("/iss:myField/iss::Email");
oEnvelope.CC = submitter_email;
oEnvelope.Subject = subj;
oEnvelope.Introduction = intro;
oEnvelope.Visible = true;
}
catch (ex)
{
XDocument.UI.Alert(ex.description);
}
// eventObj.ReturnStatus = true;
}