Expand my Community achievements bar.

addresses in email submit not showing

Avatar

Level 7

I have this script in the click event of a submit button:

bUI: true,

cTo: "name@follett.com; " + "name@follett.com;",

cCc: page1.injuredInfo.injuryInfo.descField.rawValue + ";" + page1.injuredInfo.injuryInfo.gvpEmail.rawValue + ";" + "name@follett.com; " + "name@follett.com; " + "name@follett.com;"

          + "name@follett.com;" + "name@follett.com;" + "name@follett.com",

cSubject: "Incident Report - " + page1.incidentInfo.incidentType.formattedValue,

cMsg: "",

I've taken the actual names out of the email addresses for privacy, but I have tested each email address and they are valid. The two "rawValue" fields are appearing as null and only 2 of the remaining email addresses are displaying in the email.

The fields where the rawValues are coming from were hidden and that didn't work so I made them visible to test and it's still not working.

The email addresses in the cTo: line are working fine.

I'm not sure what's wrong.

Thanks in advance for your help!

MDawn

1 Reply

Avatar

Level 10

Margaret,

       The issue could be with the path you are using to reference those two fields. Check the path is correct.

        Also, It would be easy to have the data to be taken into variables, before you use them in the send email function.

        This way you can place print the values in the messageBox and verify if they are correct..  

        For example:

              

     var strToAddress, strCCAddress, strSubject, strMessage
     strToAddress = "name@follett.com; " + "name@follett.com;";
     strCCAddress =  page1.injuredInfo.injuryInfo.descField.rawValue + ";" +
                                page1.injuredInfo.injuryInfo.gvpEmail.rawValue + ";" +
                                "name@follett.com; " + "name@follett.com; " +
                                "name@follett.com;"+ "name@follett.com;" +
                                "name@follett.com;" + "name@follett.com";

        

      xfa.host.messageBox("strCCAddress = " + strCCAddress);


     strSubject = "Incident Report - " + page1.incidentInfo.incidentType.formattedValue;
     strMessage = "";

     event.target.submitForm({cURL:"mailto:"+ strToAddress + "?cc=" + strCCAddress + "&subject=" + strSubject + "&body=" + strMessage,cSubmitAs:"PDF",cCharset:"utf-8"});

     

Thanks

Srini