I have a form that includes a radiobutton selection of reject or approve. Pending on what the sales director chooses, i would like the button that selected to submit a specific email response. I'm not too familiar with JavaScript and if and else statements, so i'm sure its something obvious that i'm not seeing. Can someone let me know where i need to adjust?
Thanks,
Here is the code:
form1.page1.subform4.Button1::click - (JavaScript, client)
//If Sales Director approves the request then send this approval E-mail.
If (subform4.RadioButtonList == "1") {
event.target.mailDoc({
bUI: false,
// Mail to...
cTo: "TestPerson",
//Copy address
cCc: "TestPerson" + "TestPerson" + subform1.applicationEngineer.rawValue,
//Subject line
cSubject: "HI Order Expedite Request - Accepted for " + subform1.projectName.rawValue,
//Body of e-mail
cMsg: "We have received a request to expedite " + subform1.projectNumber.rawValue + " - " + subform1.projectName.rawValue + "." +
"\n" + "Please complete the purchase review section of the attached form and" +
"\n" +
"\n" + "Thanks you"
});
}
//If the Sales director rejects the request, then send this rejection letter.
else {
event.target.mailDoc({
bUI: false,
// Mail to...
cTo: subform1.applicationEngineer.rawValue,
//Copy address
cCc: "TestPerson",
//Subject line
cSubject: "HI Order Expedite Request - Rejected for " + subform1.projectName.rawValue,
//Body of e-mail
cMsg: "Please review the attachment and either accept it or reject the expeditied request. For more information, please reach out to " + subform1.applicationEngineer.rawValue +
"\n" +
"\n" +
"\n" + "Thanks you"
});
}
Views
Replies
Total Likes
I've created a sample. I am happy to send it to you if you provide your email address.
Views
Replies
Total Likes
Mouslander - I was able to workshop it and get it the way i wanted. I appreciate the prompt response.
Views
Replies
Total Likes
Awesome. Its nice when you can figure it out.
Views
Replies
Total Likes
Views
Likes
Replies