Expand my Community achievements bar.

Email submit button concatenate subject and body

Avatar

Level 1

Hello Expert,

I'm trying to modify what the body of the email will look like once the user has pressed an email submit button. In Livecycle designer, I clicked on the button and viewed java script code

this.resolveNode("#event.#submit").target = "mailto:"+$record.XXXXXX.MAIL_ID.value+"?subject ="+" Subject line "+"&body="+"Body of the mail";

Whenever i click the button its conacatenate the subject line with -- " Subject line &body body of the mail ".

My requirement is to change the body of the mail. Can anyone help me on this issue.

1 Reply

Avatar

Level 9

Hi Abdul,

Try this. Create a regular button and in the click event put this script.

var mail;

var add = mailAddress.rawValue; // the to mail address you want.

var msg = "Sample message"; // This is the body of the mail Customize it as per need by fetching value from different fields

var sub = "Sample Subject"; // This is the subject of the mail.

event.target.mailDoc({

          bUI: true,

          cTo: add,

          cCc: '',

          cBcc: '',

          cSubject: sub,

          cMsg: msg

});

Thanks,

Bibhu.