Hello,
I don't know enough about scripting to resolve this so please help. When I click on my Create Email button. I get this error:
The following error occurred:
InfoPath has encountered an error. The operation failed.
The form's code contains an error.
The following call in the form's code failed: MailEnvelope.To
File:script.js
Line:44
This is the code I have for this:
function CTRL37_5::OnClick(eventObj)
{
// Write your code here
var oEnvelope = XDocument.View.Window.MailEnvelope;
oEnvelope.To = XDocument.DOM.selectSingleNode("my:ConfirmFilesForm/my:GroupEmail").text + ";" +
XDocument.DOM.selectSingleNode("my:ConfirmFilesForm/my:GroupEmail2").text;
oEnvelope.Subject = "PHS EDI File Confirmation - " +
XDocument.DOM.selectSingleNode("my:ConfirmFilesForm/my:GroupName").text;
oEnvelope.Visible = true;
}
Is the code wrong?
Any help would be greatly appreciated.
Thanks!!