V
Valentina S.
Hello to everyone,
I'm new in InfoPath and I need some HELP!
I had to create a form with a "Send as Email" button; I did, but one
problem is that in field "TO:" I can see the first person whom I
entered, and in field "CC:" I can't see noone.
Please help me with this problem.
I'm very appreciate your help!
Here is my script:
function SendEmailBtn::OnClick(oEvent)
{
createEmail();
}
function createEmail()
{
var xmlAttendees = XDocument.DOM.selectNodes("/my:MeetingAgenda/my:Attendees/my:Attendee");
var xmlAttendee;
var xmlProjectName =
XDocument.DOM.selectSingleNode("/my:MeetingAgenda/myroject/myrojectName");
var xmlEmailAddressPrimary =
XDocument.DOM.selectSingleNode("/my:MeetingAgenda/my:Attendees/my:Attendee/my:address/my:EmailAddressPrimary");
var rgRecipients = new Array();
while (xmlAttendee = xmlAttendees.nextNode())
rgRecipients.push(getNodeValue(xmlAttendee.selectSingleNode("my:EmailAddressPrimary")));
try
{
var oEnvelope = XDocument.View.Window.MailEnvelope;
oEnvelope.To = getNodeValue(xmlEmailAddressPrimary);
oEnvelope.CC = rgRecipients.join(" ;");
oEnvelope.Subject = getNodeValue(xmlProjectName);
oEnvelope.Visible = true;
}
catch (ex)
{
XDocument.UI.Alert(ex.description);
}
}
Thanks Alot.
Valentina
I'm new in InfoPath and I need some HELP!
I had to create a form with a "Send as Email" button; I did, but one
problem is that in field "TO:" I can see the first person whom I
entered, and in field "CC:" I can't see noone.
Please help me with this problem.
I'm very appreciate your help!
Here is my script:
function SendEmailBtn::OnClick(oEvent)
{
createEmail();
}
function createEmail()
{
var xmlAttendees = XDocument.DOM.selectNodes("/my:MeetingAgenda/my:Attendees/my:Attendee");
var xmlAttendee;
var xmlProjectName =
XDocument.DOM.selectSingleNode("/my:MeetingAgenda/myroject/myrojectName");
var xmlEmailAddressPrimary =
XDocument.DOM.selectSingleNode("/my:MeetingAgenda/my:Attendees/my:Attendee/my:address/my:EmailAddressPrimary");
var rgRecipients = new Array();
while (xmlAttendee = xmlAttendees.nextNode())
rgRecipients.push(getNodeValue(xmlAttendee.selectSingleNode("my:EmailAddressPrimary")));
try
{
var oEnvelope = XDocument.View.Window.MailEnvelope;
oEnvelope.To = getNodeValue(xmlEmailAddressPrimary);
oEnvelope.CC = rgRecipients.join(" ;");
oEnvelope.Subject = getNodeValue(xmlProjectName);
oEnvelope.Visible = true;
}
catch (ex)
{
XDocument.UI.Alert(ex.description);
}
}
Thanks Alot.
Valentina