I'm trying to modify this function and was hoping to get some help from the community. How do add a code so when a field state changes, in this case, if a field is checked/selected, it would send me an email alert via my smarthost / smtp server. I tried using Rules and having my email address as the Data Connection but that didn't work as there is no Outlook installed (installing is not an option)
//=======
// The following function handler is created by Microsoft Office InfoPath.
// Do not modify the name of the function, or the name and number of arguments.
//=======
function SaveSubmit::OnClick(eventObj)
{
if(!CheckCommentsLength())
{
return;
}
if (! FieldName()) {
return;
}
if (SaveForm()) { // if worked to save then
var formid = XDocument.DOM.selectSingleNode
(g_datarootelement + "/my:FieldName1").text;
var version = XDocument.DOM.selectSingleNode
(g_datarootelement + "/my:FieldName2").text;
var usertoken = XDocument.DOM.selectSingleNode
(g_datarootelement + "/my:FieldName3").text;
UnlockForm(form1, form2, form3);
}
ForceClose();
}