You need to take this one step at a time. Start by trying to get to the data
stored in your SharePoint data connection. Add something like the following
code at the beginning of the function:
var objSPSList =
XDocument.DataObjects["<Your_SharePoint_List_Data_Connection_Name>"].DOM;
XDocument.UI.Alert(objSPSList.xml);
What does the last line return?
---
S.Y.M. Wong-A-Ton
Ted said:
I do have a sharepoint list as a data connection. I am not sure how to loop
thgough the addresses and show to create the string or where to put it once
it is created. I see the to field in the code but not sure how to modify it
to make it loop the addresses from the list. How would I modify the code
below.
function createEmail()
{
var xmlContributors =
XDocument.DOM.selectNodes("/iss:issue/iss:contributors/iss:contributor");
var xmlContributor;
var xmlTitle = XDocument.DOM.selectSingleNode("/iss:issue/iss:title");
var rgRecipients = new Array();
while (xmlContributor = xmlContributors.nextNode())
rgRecipients.push(getNodeValue(xmlContributor.selectSingleNode("iss:emailAddressPrimary")));
try
{
var oEnvelope = XDocument.View.Window.MailEnvelope;
oEnvelope.To = rgRecipients.join("; ");
oEnvelope.Subject = getNodeValue(xmlTitle);
oEnvelope.Visible = true;
}
catch (ex)
{
XDocument.UI.Alert(ex.description);
}
:
Do you have a SharePoint list as a Data Connection in your form? If you do,
it's just a matter of looping through all the email addresses in the list,
and composing a string by joining the email addresses with a semi-colon and
then using this string in the "To" field of your email message.
---
S.Y.M. Wong-A-Ton
:
I am trying to modify the default issue tracking formso that when you click
the send as email button the form will gather the email addresses from a
sharepoint list.
I am not a programmer so I am not sure how to do this.